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

Unified Diff: components/image_fetcher/image_fetcher.h

Issue 2757643002: components/image_fetcher: Expose RequestMetadata from ImageFetcher (Closed)
Patch Set: logo_bridge 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 | « chrome/browser/search/thumbnail_source.cc ('k') | components/image_fetcher/image_fetcher_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/image_fetcher/image_fetcher.h
diff --git a/components/image_fetcher/image_fetcher.h b/components/image_fetcher/image_fetcher.h
index a5b1c7f1d7575845c70ac677c6f97ef508d24df6..0fe7ea4802a81b950feeba719e6bd6c60fced7b2 100644
--- a/components/image_fetcher/image_fetcher.h
+++ b/components/image_fetcher/image_fetcher.h
@@ -22,6 +22,8 @@ namespace image_fetcher {
class ImageDecoder;
+struct RequestMetadata;
+
// A class used to fetch server images. It can be called from any thread and the
// callback will be called on the thread which initiated the fetch.
class ImageFetcher {
@@ -29,6 +31,11 @@ class ImageFetcher {
ImageFetcher() {}
virtual ~ImageFetcher() {}
+ using ImageFetcherCallback =
+ base::Callback<void(const std::string& id,
+ const gfx::Image& image,
+ const RequestMetadata& metadata)>;
+
using DataUseServiceName = data_use_measurement::DataUseUserData::ServiceName;
virtual void SetImageFetcherDelegate(ImageFetcherDelegate* delegate) = 0;
@@ -50,7 +57,7 @@ class ImageFetcher {
virtual void StartOrQueueNetworkRequest(
const std::string& id,
const GURL& image_url,
- base::Callback<void(const std::string&, const gfx::Image&)> callback) = 0;
+ const ImageFetcherCallback& callback) = 0;
virtual ImageDecoder* GetImageDecoder() = 0;
« no previous file with comments | « chrome/browser/search/thumbnail_source.cc ('k') | components/image_fetcher/image_fetcher_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698