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

Side by Side Diff: components/search_provider_logos/logo_tracker.h

Issue 2303653002: Precache per-resource cap should be applied on network bytes used (Closed)
Patch Set: rebased Created 4 years, 2 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
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 #ifndef COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_ 5 #ifndef COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_
6 #define COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_ 6 #define COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // Called when the fresh logo has been decoded into an SkBitmap. |image| will 197 // Called when the fresh logo has been decoded into an SkBitmap. |image| will
198 // be NULL if decoding failed. 198 // be NULL if decoding failed.
199 void OnFreshLogoAvailable(std::unique_ptr<EncodedLogo> logo, 199 void OnFreshLogoAvailable(std::unique_ptr<EncodedLogo> logo,
200 bool parsing_failed, 200 bool parsing_failed,
201 const SkBitmap& image); 201 const SkBitmap& image);
202 202
203 // net::URLFetcherDelegate: 203 // net::URLFetcherDelegate:
204 void OnURLFetchComplete(const net::URLFetcher* source) override; 204 void OnURLFetchComplete(const net::URLFetcher* source) override;
205 void OnURLFetchDownloadProgress(const net::URLFetcher* source, 205 void OnURLFetchDownloadProgress(const net::URLFetcher* source,
206 int64_t current, 206 int64_t current,
207 int64_t total) override; 207 int64_t total,
208 int64_t current_network_bytes) override;
208 209
209 // The URL from which the logo is fetched. 210 // The URL from which the logo is fetched.
210 GURL logo_url_; 211 GURL logo_url_;
211 212
212 // The function used to parse the logo response from the server. 213 // The function used to parse the logo response from the server.
213 ParseLogoResponse parse_logo_response_func_; 214 ParseLogoResponse parse_logo_response_func_;
214 215
215 // The function used to include the cached logo's fingerprint and call to 216 // The function used to include the cached logo's fingerprint and call to
216 // action request in the logo URL. 217 // action request in the logo URL.
217 AppendQueryparamsToLogoURL append_queryparams_func_; 218 AppendQueryparamsToLogoURL append_queryparams_func_;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; 264 scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
264 265
265 base::WeakPtrFactory<LogoTracker> weak_ptr_factory_; 266 base::WeakPtrFactory<LogoTracker> weak_ptr_factory_;
266 267
267 DISALLOW_COPY_AND_ASSIGN(LogoTracker); 268 DISALLOW_COPY_AND_ASSIGN(LogoTracker);
268 }; 269 };
269 270
270 } // namespace search_provider_logos 271 } // namespace search_provider_logos
271 272
272 #endif // COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_ 273 #endif // COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_
OLDNEW
« no previous file with comments | « components/precache/core/precache_fetcher.cc ('k') | components/search_provider_logos/logo_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698