Commit 44d6990c authored by Nicolas Dossou-gbete's avatar Nicolas Dossou-gbete Committed by Commit Bot

🏡 Disable the ChromeHome dependent doodle fetching

The LogoServiceFactory caches the UI at creation, but since it can
now change at runtime, this can cause displaying Doodles on classic
New Tab Pages with ChromeHome's white background.

As temporary workaround for M63 that won't display Doodles in
ChromeHome, we simply stop configuring the LogoServiceFactory to
fetch ChromeHome specific Doodles.

Bug: 776725
Change-Id: I1b2df2250f597671057aa10c86e5a1fa2177d8fa
Reviewed-on: https://chromium-review.googlesource.com/743901Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Commit-Queue: Nicolas Dossou-Gbété <dgn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512527}
parent f2d08f66
......@@ -14,17 +14,9 @@
#include "components/search_provider_logos/logo_service_impl.h"
#include "net/url_request/url_request_context_getter.h"
#if defined(OS_ANDROID)
#include "chrome/browser/android/feature_utilities.h"
#endif
using search_provider_logos::LogoService;
using search_provider_logos::LogoServiceImpl;
#if defined(OS_ANDROID)
using chrome::android::GetIsChromeHomeEnabled;
#endif // defined(OS_ANDROID)
namespace {
constexpr base::FilePath::CharType kCachedLogoDirectory[] =
......@@ -57,7 +49,12 @@ KeyedService* LogoServiceFactory::BuildServiceInstanceFor(
Profile* profile = static_cast<Profile*>(context);
DCHECK(!profile->IsOffTheRecord());
#if defined(OS_ANDROID)
bool use_gray_background = !GetIsChromeHomeEnabled();
// TODO(https://crbug.com/776725): Update LogoServiceImpl to request the
// latest value instead of caching it. Depending on the UI mode (ChromeHome
// enabled or not), the background where the logo is used changes from gray to
// white. This value can change at runtime, so we should stop using a value
// determined at factory instantiation time.
bool use_gray_background = true;
#else
bool use_gray_background = false;
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment