Chromium Code Reviews| Index: components/image_fetcher/image_data_fetcher.h |
| diff --git a/components/image_fetcher/image_data_fetcher.h b/components/image_fetcher/image_data_fetcher.h |
| index 5383086a519b2aa37324ab4335a5df99ef229d1e..ac32aa04c63f0be0e6540e0a653546c43cd7451a 100644 |
| --- a/components/image_fetcher/image_data_fetcher.h |
| +++ b/components/image_fetcher/image_data_fetcher.h |
| @@ -24,10 +24,21 @@ class URLRequestContextGetter; |
| namespace image_fetcher { |
| +struct RequestMetadata { |
|
gambard
2017/02/09 13:44:12
I don't know if this should be inside the class?
Marc Treib
2017/02/09 13:49:48
That's mostly a matter of taste IMO. I tend to sli
sdefresne
2017/02/09 13:55:28
drive-by: having the class separate make it easier
gambard
2017/02/09 15:10:32
Actually, I have moved it to its own class.
gambard
2017/02/09 15:10:32
Ok, I think I will let it outside the class as it
|
| + std::string mime_type; |
| + |
| + bool operator==(const RequestMetadata& rhs) const { |
|
Marc Treib
2017/02/09 13:49:48
Are the equality operators required?
sdefresne
2017/02/09 13:55:28
Even if they are required, they generally do not n
gambard
2017/02/09 15:10:32
They are mainly here for testing (verifying that t
|
| + return mime_type == rhs.mime_type; |
| + } |
| + |
| + bool operator!=(const RequestMetadata& rhs) const { return !operator==(rhs); } |
| +}; |
| + |
| class ImageDataFetcher : public net::URLFetcherDelegate { |
| public: |
| using ImageDataFetcherCallback = |
| - base::Callback<void(const std::string& image_data)>; |
| + base::Callback<void(const std::string& image_data, |
| + const RequestMetadata& request_metadata)>; |
| using DataUseServiceName = data_use_measurement::DataUseUserData::ServiceName; |