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

Side by Side Diff: chrome/browser/android/logo_service.cc

Issue 1966203002: Use the NTP-MD flag for transparent doodle requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/android/chrome_feature_list.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/android/logo_service.h" 5 #include "chrome/browser/android/logo_service.h"
6 6
7 #include "base/feature_list.h" 7 #include "base/feature_list.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 BrowserThread::GetBlockingPool(), profile_->GetRequestContext(), 121 BrowserThread::GetBlockingPool(), profile_->GetRequestContext(),
122 std::unique_ptr<search_provider_logos::LogoDelegate>( 122 std::unique_ptr<search_provider_logos::LogoDelegate>(
123 new ChromeLogoDelegate()))); 123 new ChromeLogoDelegate())));
124 } 124 }
125 125
126 logo_tracker_->SetServerAPI( 126 logo_tracker_->SetServerAPI(
127 GetGoogleDoodleURL(profile_), 127 GetGoogleDoodleURL(profile_),
128 base::Bind(&search_provider_logos::GoogleParseLogoResponse), 128 base::Bind(&search_provider_logos::GoogleParseLogoResponse),
129 base::Bind(&search_provider_logos::GoogleAppendQueryparamsToLogoURL), 129 base::Bind(&search_provider_logos::GoogleAppendQueryparamsToLogoURL),
130 true, /* wants_cta */ 130 true, /* wants_cta */
131 base::FeatureList::IsEnabled(chrome::android::kNTPTransparentDoodle)); 131 base::FeatureList::IsEnabled(chrome::android::kNTPMaterialDesign));
132 logo_tracker_->GetLogo(observer); 132 logo_tracker_->GetLogo(observer);
133 } 133 }
134 134
135 // LogoServiceFactory --------------------------------------------------------- 135 // LogoServiceFactory ---------------------------------------------------------
136 136
137 // static 137 // static
138 LogoService* LogoServiceFactory::GetForProfile(Profile* profile) { 138 LogoService* LogoServiceFactory::GetForProfile(Profile* profile) {
139 return static_cast<LogoService*>( 139 return static_cast<LogoService*>(
140 GetInstance()->GetServiceForBrowserContext(profile, true)); 140 GetInstance()->GetServiceForBrowserContext(profile, true));
141 } 141 }
(...skipping 10 matching lines...) Expand all
152 } 152 }
153 153
154 LogoServiceFactory::~LogoServiceFactory() {} 154 LogoServiceFactory::~LogoServiceFactory() {}
155 155
156 KeyedService* LogoServiceFactory::BuildServiceInstanceFor( 156 KeyedService* LogoServiceFactory::BuildServiceInstanceFor(
157 content::BrowserContext* context) const { 157 content::BrowserContext* context) const {
158 Profile* profile = static_cast<Profile*>(context); 158 Profile* profile = static_cast<Profile*>(context);
159 DCHECK(!profile->IsOffTheRecord()); 159 DCHECK(!profile->IsOffTheRecord());
160 return new LogoService(profile); 160 return new LogoService(profile);
161 } 161 }
OLDNEW
« no previous file with comments | « chrome/browser/android/chrome_feature_list.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698