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

Unified Diff: extensions/common/host_id.cc

Issue 885493007: Refactoring: de-couple Extensions from "script injection System" [render side] : 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « extensions/common/host_id.h ('k') | extensions/extensions.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/host_id.cc
diff --git a/extensions/common/host_id.cc b/extensions/common/host_id.cc
new file mode 100644
index 0000000000000000000000000000000000000000..121e8e412b7c047d1e4568573b9ffe6ba437837f
--- /dev/null
+++ b/extensions/common/host_id.cc
@@ -0,0 +1,32 @@
+// Copyright 2015 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 "extensions/common/host_id.h"
+
+HostID::HostID() {
+}
+
+HostID::HostID(HostType type, const std::string& id)
+ : type_(type), id_(id) {
+}
+
+HostID::HostID(const HostID& host_id)
+ : type_(host_id.type()),
+ id_(host_id.id()) {
+}
+
+HostID::~HostID() {
+}
+
+bool HostID::operator<(const HostID& host_id) const {
+ if (type_ != host_id.type())
+ return type_ < host_id.type();
+ else if (id_ != host_id.id())
+ return id_ < host_id.id();
+ return false;
+}
+
+bool HostID::operator==(const HostID& host_id) const {
+ return type_ == host_id.type() && id_ == host_id.id();
+}
« no previous file with comments | « extensions/common/host_id.h ('k') | extensions/extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698