Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8490)

Unified Diff: chrome/browser/doodle/doodle_service_factory.cc

Issue 2768333002: [Doodle] Pass parameters to the server endpoint (Closed)
Patch Set: ifdef android Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/doodle/doodle_fetcher_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/doodle/doodle_service_factory.cc
diff --git a/chrome/browser/doodle/doodle_service_factory.cc b/chrome/browser/doodle/doodle_service_factory.cc
index f3ca182da461d94dd3e97e0153c7f12153cd4f69..85514239f46c6d5f2121e235452a40081321a084 100644
--- a/chrome/browser/doodle/doodle_service_factory.cc
+++ b/chrome/browser/doodle/doodle_service_factory.cc
@@ -20,6 +20,10 @@
#include "components/prefs/pref_service.h"
#include "components/safe_json/safe_json_parser.h"
+#if defined(OS_ANDROID)
+#include "chrome/browser/android/chrome_feature_list.h"
+#endif
+
// static
DoodleServiceFactory* DoodleServiceFactory::GetInstance() {
return base::Singleton<DoodleServiceFactory>::get();
@@ -46,10 +50,15 @@ KeyedService* DoodleServiceFactory::BuildServiceInstanceFor(
// We don't show doodles in incognito profiles (for now?).
DCHECK(!profile->IsOffTheRecord());
+ bool use_gray_background = false;
+#if defined(OS_ANDROID)
+ use_gray_background =
+ !base::FeatureList::IsEnabled(chrome::android::kChromeHomeFeature);
+#endif
auto fetcher = base::MakeUnique<doodle::DoodleFetcherImpl>(
profile->GetRequestContext(),
GoogleURLTrackerFactory::GetForProfile(profile),
- base::Bind(&safe_json::SafeJsonParser::Parse));
+ base::Bind(&safe_json::SafeJsonParser::Parse), use_gray_background);
return new doodle::DoodleService(profile->GetPrefs(), std::move(fetcher),
base::MakeUnique<base::OneShotTimer>(),
base::MakeUnique<base::DefaultClock>(),
« no previous file with comments | « no previous file | components/doodle/doodle_fetcher_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698