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

Side by Side Diff: chrome/browser/extensions/apps_promo.h

Issue 10386063: Move URLFetcherDelegate to net/ and split URLFetcher between net/ and content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head, fix win component build Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_EXTENSIONS_APPS_PROMO_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_APPS_PROMO_H_
6 #define CHROME_BROWSER_EXTENSIONS_APPS_PROMO_H_ 6 #define CHROME_BROWSER_EXTENSIONS_APPS_PROMO_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 }; 142 };
143 143
144 // Fetches logos over HTTPS, making sure we don't send cookies and that we 144 // Fetches logos over HTTPS, making sure we don't send cookies and that we
145 // cache the image until its source URL changes. 145 // cache the image until its source URL changes.
146 class AppsPromoLogoFetcher : public content::URLFetcherDelegate { 146 class AppsPromoLogoFetcher : public content::URLFetcherDelegate {
147 public: 147 public:
148 AppsPromoLogoFetcher(Profile* profile, 148 AppsPromoLogoFetcher(Profile* profile,
149 const AppsPromo::PromoData& promo_data); 149 const AppsPromo::PromoData& promo_data);
150 virtual ~AppsPromoLogoFetcher(); 150 virtual ~AppsPromoLogoFetcher();
151 151
152 virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; 152 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
153 153
154 private: 154 private:
155 // Fetches the logo and stores the result as a data URL. 155 // Fetches the logo and stores the result as a data URL.
156 void FetchLogo(); 156 void FetchLogo();
157 157
158 // Checks if the logo was downloaded previously. 158 // Checks if the logo was downloaded previously.
159 bool HaveCachedLogo(); 159 bool HaveCachedLogo();
160 160
161 // Sets the apps promo based on the current data and then issues the 161 // Sets the apps promo based on the current data and then issues the
162 // WEB_STORE_PROMO_LOADED notification so open NTPs can inject the promo. 162 // WEB_STORE_PROMO_LOADED notification so open NTPs can inject the promo.
163 void SavePromo(); 163 void SavePromo();
164 164
165 // Checks if the promo logo matches https://*.google.com/*.png. 165 // Checks if the promo logo matches https://*.google.com/*.png.
166 bool SupportsLogoURL(); 166 bool SupportsLogoURL();
167 167
168 Profile* profile_; 168 Profile* profile_;
169 AppsPromo::PromoData promo_data_; 169 AppsPromo::PromoData promo_data_;
170 scoped_ptr<content::URLFetcher> url_fetcher_; 170 scoped_ptr<content::URLFetcher> url_fetcher_;
171 }; 171 };
172 172
173 #endif // CHROME_BROWSER_EXTENSIONS_APPS_PROMO_H_ 173 #endif // CHROME_BROWSER_EXTENSIONS_APPS_PROMO_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_notify_channel_setup.cc ('k') | chrome/browser/extensions/apps_promo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698