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

Unified Diff: components/offline_pages/core/client_id.cc

Issue 2879013002: Create skeleton for the Prefetching store and initial pipeline step. (Closed)
Patch Set: Made construction params a cost&. Created 3 years, 7 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/core/client_id.h ('k') | components/offline_pages/core/offline_page_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/core/client_id.cc
diff --git a/components/offline_pages/core/client_id.cc b/components/offline_pages/core/client_id.cc
new file mode 100644
index 0000000000000000000000000000000000000000..df60634116b2acebe855e6d2f4493799698a5252
--- /dev/null
+++ b/components/offline_pages/core/client_id.cc
@@ -0,0 +1,25 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/offline_pages/core/client_id.h"
+
+namespace offline_pages {
+
+ClientId::ClientId() {}
+
+ClientId::ClientId(const std::string& name_space, const std::string& id)
+ : name_space(name_space), id(id) {}
+
+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;
+}
+
+} // namespace offline_pages
« no previous file with comments | « components/offline_pages/core/client_id.h ('k') | components/offline_pages/core/offline_page_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698