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

Unified Diff: components/image_fetcher/core/request_metadata.cc

Issue 2793983002: [ImageFetcher] Return http response headers (Closed)
Patch Set: Fix unit-tests Created 3 years, 8 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/core/request_metadata.cc
diff --git a/components/image_fetcher/core/request_metadata.cc b/components/image_fetcher/core/request_metadata.cc
index b9b31d555054fdefae9b16f77e4c7f591732a4fb..1e3d266c948a2b493c1f832c010f2b74b0c8df29 100644
--- a/components/image_fetcher/core/request_metadata.cc
+++ b/components/image_fetcher/core/request_metadata.cc
@@ -7,9 +7,13 @@
namespace image_fetcher {
RequestMetadata::RequestMetadata()
- : http_response_code(RESPONSE_CODE_INVALID), from_http_cache(false) {}
+ : http_response_code(RESPONSE_CODE_INVALID),
+ from_http_cache(false),
+ http_response_headers(nullptr) {}
bool operator==(const RequestMetadata& lhs, const RequestMetadata& rhs) {
+ // Do not compare |http_response_headers| as this is solely used in
markusheintz_ 2017/04/04 13:33:36 I don't understand this comment. Do we really only
jkrcal 2017/04/04 16:42:02 I rephrased the comment.
markusheintz_ 2017/04/06 08:52:03 Oh so the equals operator is only used in test! I
jkrcal 2017/04/06 14:18:23 Okay, I added the check also for the headers.
+ // unit-tests. The pointer to headers cannot be expected, easily.
return lhs.mime_type == rhs.mime_type &&
lhs.http_response_code == rhs.http_response_code &&
lhs.from_http_cache == rhs.from_http_cache;
« no previous file with comments | « components/image_fetcher/core/request_metadata.h ('k') | components/image_fetcher/core/request_metadata_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698