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

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

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/BUILD.gn ('k') | components/offline_pages/core/client_id.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/core/client_id.h
diff --git a/components/offline_pages/core/client_id.h b/components/offline_pages/core/client_id.h
new file mode 100644
index 0000000000000000000000000000000000000000..8c749828344776fd0bbb82316e9d39f54b919c4a
--- /dev/null
+++ b/components/offline_pages/core/client_id.h
@@ -0,0 +1,36 @@
+// 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.
+
+#ifndef COMPONENTS_OFFLINE_PAGES_CORE_CLIENT_ID_H_
+#define COMPONENTS_OFFLINE_PAGES_CORE_CLIENT_ID_H_
+
+#include <string>
+
+namespace offline_pages {
+
+// Defines a namespace/id pair that allows offline page clients to uniquely
+// identify their own items within adopting internal systems. It is the client's
+// responsibility to keep id values unique within its assigned namespace, but it
+// is not a requirement.
+struct ClientId {
+ ClientId();
+ ClientId(const std::string& name_space, const std::string& id);
+
+ bool operator==(const ClientId& client_id) const;
+
+ bool operator<(const ClientId& client_id) const;
+
+ // The namespace that identifies the client (of course 'namespace' is a
+ // reserved word, so...).
+ std::string name_space;
+
+ // The client specified id that allows it to uniquely identify entries within
+ // its namespace. These values are opaque to offline page systems and not used
+ // internally as an identifier.
+ std::string id;
+};
+
+} // namespace offline_pages
+
+#endif // COMPONENTS_OFFLINE_PAGES_CORE_CLIENT_ID_H_
« no previous file with comments | « components/offline_pages/core/BUILD.gn ('k') | components/offline_pages/core/client_id.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698