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..b61f60e8ff5afef7cff093ae9a3079987558528e 100644 |
--- a/components/image_fetcher/image_data_fetcher.h |
+++ b/components/image_fetcher/image_data_fetcher.h |
@@ -13,6 +13,7 @@ |
#include "base/macros.h" |
#include "base/memory/ref_counted.h" |
#include "components/data_use_measurement/core/data_use_user_data.h" |
+#include "net/url_request/url_fetcher.h" |
#include "net/url_request/url_fetcher_delegate.h" |
#include "net/url_request/url_request.h" |
#include "url/gurl.h" |
@@ -26,8 +27,18 @@ namespace image_fetcher { |
class ImageDataFetcher : public net::URLFetcherDelegate { |
public: |
+ // Imposible http response code. Used to signal that no http response code |
Marc Treib
2017/02/07 10:10:21
nit: Impossible
sdefresne
2017/02/07 10:18:30
Imposible -> Impossible
gambard
2017/02/08 14:48:12
Done.
|
+ // was received. |
+ enum ResponseCode { |
+ RESPONSE_CODE_INVALID = net::URLFetcher::RESPONSE_CODE_INVALID |
Marc Treib
2017/02/07 10:10:21
Hm, I'm not entirely convinced we want this alias.
Marc Treib
2017/02/07 10:23:14
As discussed out-of-band: I'm okay with the alias.
gambard
2017/02/08 14:48:12
Acknowledged.
|
+ }; |
+ |
+ // Callback with the |image_data| and the |http_response_code|. If an error |
+ // prevented a http response, |http_response_code| will be |
+ // RESPONSE_CODE_INVALID. |
using ImageDataFetcherCallback = |
- base::Callback<void(const std::string& image_data)>; |
+ base::Callback<void(const std::string& image_data, |
+ int http_response_code)>; |
using DataUseServiceName = data_use_measurement::DataUseUserData::ServiceName; |