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

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

Issue 2879013002: Create skeleton for the Prefetching store and initial pipeline step. (Closed)
Patch Set: More minor sorting. 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
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..8618936b4adb3a3f5f8db9ff426f53ca1821e81b
--- /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(std::string name_space, 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

Powered by Google App Engine
This is Rietveld 408576698