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

Unified Diff: components/offline_pages/offline_page_item.cc

Issue 2197573003: Provide API in RequestCoordinator to remove results by client ID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment changes per feedback Created 4 years, 4 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
« no previous file with comments | « components/offline_pages/offline_page_item.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/offline_page_item.cc
diff --git a/components/offline_pages/offline_page_item.cc b/components/offline_pages/offline_page_item.cc
index 3fca9fcd47ee7076ce8aeb2d814b1c19f9c2af0c..55cf901766ccf80c5043cd6937be3e3469c70345 100644
--- a/components/offline_pages/offline_page_item.cc
+++ b/components/offline_pages/offline_page_item.cc
@@ -21,6 +21,13 @@ bool ClientId::operator==(const ClientId& client_id) const {
return name_space == client_id.name_space && id == client_id.id;
}
+bool ClientId::operator<(const ClientId& client_id) const {
+ if (name_space == client_id.name_space)
+ return (id < client_id.id);
+
+ return name_space < client_id.name_space;
+}
+
OfflinePageItem::OfflinePageItem()
: version(kCurrentVersion),
file_size(0),
« no previous file with comments | « components/offline_pages/offline_page_item.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698