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

Unified Diff: chrome/browser/extensions/api/declarative/rule_identifier.h

Issue 9315010: RulesRegistry for declarative APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 8 years, 11 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: chrome/browser/extensions/api/declarative/rule_identifier.h
diff --git a/chrome/browser/extensions/api/declarative/rule_identifier.h b/chrome/browser/extensions/api/declarative/rule_identifier.h
new file mode 100644
index 0000000000000000000000000000000000000000..9534293518568acc27cf35c62df90db9c3d285c4
--- /dev/null
+++ b/chrome/browser/extensions/api/declarative/rule_identifier.h
@@ -0,0 +1,33 @@
+// Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULE_IDENTIFIER_H__
+#define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULE_IDENTIFIER_H__
+#pragma once
+
+#include <string>
+
+namespace extensions {
+
+// A globally unique rule identifier
+class RuleIdentifier {
+ public:
+ RuleIdentifier(const std::string& extension_id,
+ const std::string& rule_id);
+ RuleIdentifier(const RuleIdentifier& other);
+ ~RuleIdentifier();
+
+ const std::string& extension_id() const { return extension_id_; }
+ const std::string& rule_id() const { return rule_id_; }
+
+ bool operator<(const RuleIdentifier& other) const;
+ RuleIdentifier& operator=(const RuleIdentifier& other);
+ private:
+ std::string extension_id_;
+ std::string rule_id_;
+};
+
+} // extensions
+
+#endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULE_IDENTIFIER_H__

Powered by Google App Engine
This is Rietveld 408576698