Code: KeyedService* LogoServiceFactory::BuildServiceInstanceFor(
    content::BrowserContext* context) const {
  Profile* profile = static_cast<Profile*>(context);
  DCHECK(!profile->IsOffTheRecord());
#if defined(OS_ANDROID)
  bool use_gray_background = !GetIsChromeHomeEnabled();
 #else
   bool use_gray_background = false;
 #endif
  return new LogoService(profile->GetPath().Append(kCachedLogoDirectory),
                         TemplateURLServiceFactory::GetForProfile(profile),
                         base::MakeUnique<suggestions::ImageDecoderImpl>(),
                         profile->GetRequestContext(), use_gray_background);
 }

Commit Message: Local NTP: add smoke tests for doodles

Split LogoService into LogoService interface and LogoServiceImpl to make
it easier to provide fake data to the test.

Bug: 768419
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I84639189d2db1b24a2e139936c99369352bab587
Reviewed-on: https://chromium-review.googlesource.com/690198
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Chris Pickel <sfiera@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505374}
CWE ID: CWE-119
KeyedService* LogoServiceFactory::BuildServiceInstanceFor(
    content::BrowserContext* context) const {
  Profile* profile = static_cast<Profile*>(context);
  DCHECK(!profile->IsOffTheRecord());
#if defined(OS_ANDROID)
  bool use_gray_background = !GetIsChromeHomeEnabled();
 #else
   bool use_gray_background = false;
 #endif
  return new LogoServiceImpl(profile->GetPath().Append(kCachedLogoDirectory),
                             TemplateURLServiceFactory::GetForProfile(profile),
                             base::MakeUnique<suggestions::ImageDecoderImpl>(),
                             profile->GetRequestContext(), use_gray_background);
 }
