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

Unified Diff: components/image_fetcher/image_data_fetcher.h

Issue 2677993002: Use IOSImageDataFetcherWrapper for favicon (Closed)
Patch Set: Add header Created 3 years, 10 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
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;

Powered by Google App Engine
This is Rietveld 408576698