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

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

Issue 2807143002: [Image fetcher] Add Content-Location header to image_fetcher::RequestMetadata (Closed)
Patch Set: 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 2fa6e5493d0de3acdbeb03c7c76fda6d8285ef49..13ffadaa35765a6acb1201f681db54f4853e224c 100644
--- a/components/image_fetcher/core/request_metadata.cc
+++ b/components/image_fetcher/core/request_metadata.cc
@@ -4,35 +4,16 @@
#include "components/image_fetcher/core/request_metadata.h"
-#include "net/http/http_response_headers.h"
-
namespace image_fetcher {
-namespace {
-
-bool HttpHeadersEqual(const net::HttpResponseHeaders* lhs,
- const net::HttpResponseHeaders* rhs) {
- if (!lhs && !rhs) {
- return true; // Equal if both nullptr.
- }
- if (!lhs || !rhs) {
- return false; // We cannot compare the content if one of them is nullptr.
- }
- return lhs->raw_headers() == rhs->raw_headers();
-}
-
-} // namespace
-
RequestMetadata::RequestMetadata()
- : http_response_code(RESPONSE_CODE_INVALID),
- from_http_cache(false),
- http_response_headers(nullptr) {}
+ : http_response_code(RESPONSE_CODE_INVALID), from_http_cache(false) {}
bool operator==(const RequestMetadata& lhs, const RequestMetadata& rhs) {
return lhs.mime_type == rhs.mime_type &&
lhs.http_response_code == rhs.http_response_code &&
lhs.from_http_cache == rhs.from_http_cache &&
- HttpHeadersEqual(lhs.http_response_headers, rhs.http_response_headers);
+ lhs.content_location_header == rhs.content_location_header;
}
bool operator!=(const RequestMetadata& lhs, const RequestMetadata& rhs) {
« 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