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

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

Issue 1962013002: Adding a parameter that will be used to request a transparent doodle. (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 | « no previous file | components/search_provider_logos/google_logo_api.h » ('j') | 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/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
10 #include "chrome/browser/image_decoder.h" 10 #include "chrome/browser/image_decoder.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), 118 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
119 BrowserThread::GetBlockingPool(), profile_->GetRequestContext(), 119 BrowserThread::GetBlockingPool(), profile_->GetRequestContext(),
120 std::unique_ptr<search_provider_logos::LogoDelegate>( 120 std::unique_ptr<search_provider_logos::LogoDelegate>(
121 new ChromeLogoDelegate()))); 121 new ChromeLogoDelegate())));
122 } 122 }
123 123
124 logo_tracker_->SetServerAPI( 124 logo_tracker_->SetServerAPI(
125 GetGoogleDoodleURL(profile_), 125 GetGoogleDoodleURL(profile_),
126 base::Bind(&search_provider_logos::GoogleParseLogoResponse), 126 base::Bind(&search_provider_logos::GoogleParseLogoResponse),
127 base::Bind(&search_provider_logos::GoogleAppendQueryparamsToLogoURL), 127 base::Bind(&search_provider_logos::GoogleAppendQueryparamsToLogoURL),
128 true); 128 true, /* wants_cta */
129 false /* transparent */);
129 logo_tracker_->GetLogo(observer); 130 logo_tracker_->GetLogo(observer);
130 } 131 }
131 132
132 // LogoServiceFactory --------------------------------------------------------- 133 // LogoServiceFactory ---------------------------------------------------------
133 134
134 // static 135 // static
135 LogoService* LogoServiceFactory::GetForProfile(Profile* profile) { 136 LogoService* LogoServiceFactory::GetForProfile(Profile* profile) {
136 return static_cast<LogoService*>( 137 return static_cast<LogoService*>(
137 GetInstance()->GetServiceForBrowserContext(profile, true)); 138 GetInstance()->GetServiceForBrowserContext(profile, true));
138 } 139 }
(...skipping 10 matching lines...) Expand all
149 } 150 }
150 151
151 LogoServiceFactory::~LogoServiceFactory() {} 152 LogoServiceFactory::~LogoServiceFactory() {}
152 153
153 KeyedService* LogoServiceFactory::BuildServiceInstanceFor( 154 KeyedService* LogoServiceFactory::BuildServiceInstanceFor(
154 content::BrowserContext* context) const { 155 content::BrowserContext* context) const {
155 Profile* profile = static_cast<Profile*>(context); 156 Profile* profile = static_cast<Profile*>(context);
156 DCHECK(!profile->IsOffTheRecord()); 157 DCHECK(!profile->IsOffTheRecord());
157 return new LogoService(profile); 158 return new LogoService(profile);
158 } 159 }
OLDNEW
« no previous file with comments | « no previous file | components/search_provider_logos/google_logo_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698