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

Side by Side Diff: components/image_fetcher/request_metadata.cc

Issue 2749283002: components/image_fetcher: Add a from_http_cache flag to RequestMetadata (Closed)
Patch Set: test Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/image_fetcher/request_metadata.h" 5 #include "components/image_fetcher/request_metadata.h"
6 6
7 namespace image_fetcher { 7 namespace image_fetcher {
8 8
9 RequestMetadata::RequestMetadata()
10 : http_response_code(RESPONSE_CODE_INVALID), from_http_cache(false) {}
11
9 bool operator==(const RequestMetadata& lhs, const RequestMetadata& rhs) { 12 bool operator==(const RequestMetadata& lhs, const RequestMetadata& rhs) {
10 return lhs.mime_type == rhs.mime_type && 13 return lhs.mime_type == rhs.mime_type &&
11 lhs.response_code == rhs.response_code; 14 lhs.http_response_code == rhs.http_response_code &&
15 lhs.from_http_cache == rhs.from_http_cache;
12 } 16 }
13 17
14 bool operator!=(const RequestMetadata& lhs, const RequestMetadata& rhs) { 18 bool operator!=(const RequestMetadata& lhs, const RequestMetadata& rhs) {
15 return !(lhs == rhs); 19 return !(lhs == rhs);
16 } 20 }
17 21
18 } // namespace image_fetcher 22 } // namespace image_fetcher
OLDNEW
« no previous file with comments | « components/image_fetcher/request_metadata.h ('k') | components/image_fetcher/request_metadata_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698