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

Unified Diff: components/image_fetcher/image_fetcher_impl.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 | « components/image_fetcher/image_fetcher.h ('k') | components/image_fetcher/image_fetcher_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/image_fetcher/image_fetcher_impl.h
diff --git a/components/image_fetcher/image_fetcher_impl.h b/components/image_fetcher/image_fetcher_impl.h
index 954f84bec85d610c9b7c5c4fa2e990047ce32765..14c778525be4e727861e4507746cc5fd7bc6793a 100644
--- a/components/image_fetcher/image_fetcher_impl.h
+++ b/components/image_fetcher/image_fetcher_impl.h
@@ -50,15 +50,11 @@ class ImageFetcherImpl : public image_fetcher::ImageFetcher {
void StartOrQueueNetworkRequest(
const std::string& id,
const GURL& image_url,
- base::Callback<void(const std::string&, const gfx::Image&)> callback)
- override;
+ const ImageFetcherCallback& callback) override;
ImageDecoder* GetImageDecoder() override;
private:
- using CallbackVector =
- std::vector<base::Callback<void(const std::string&, const gfx::Image&)>>;
-
// State related to an image fetch (id, pending callbacks).
struct ImageRequest {
ImageRequest();
@@ -73,7 +69,7 @@ class ImageFetcherImpl : public image_fetcher::ImageFetcher {
std::string id;
// Queue for pending callbacks, which may accumulate while the request is in
// flight.
- CallbackVector callbacks;
+ std::vector<ImageFetcherCallback> callbacks;
};
using ImageRequestMap = std::map<const GURL, ImageRequest>;
@@ -86,7 +82,9 @@ class ImageFetcherImpl : public image_fetcher::ImageFetcher {
// Processes image decoded events. This is the continuation method used for
// creating callbacks that are passed to the ImageDecoder.
- void OnImageDecoded(const GURL& image_url, const gfx::Image& image);
+ void OnImageDecoded(const GURL& image_url,
+ const RequestMetadata& metadata,
+ const gfx::Image& image);
ImageFetcherDelegate* delegate_;
« no previous file with comments | « components/image_fetcher/image_fetcher.h ('k') | components/image_fetcher/image_fetcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698