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

Side by Side 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: Implemented ID and priority generation Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULE_IDENTIFIER_H__
6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULE_IDENTIFIER_H__
7 #pragma once
8
9 #include <string>
10
11 namespace extensions {
12
13 // A globally unique rule identifier
14 class RuleIdentifier {
15 public:
16 RuleIdentifier(const std::string& extension_id,
17 const std::string& event_name,
18 const std::string& rule_id);
19 RuleIdentifier(const RuleIdentifier& other);
20 ~RuleIdentifier();
21
22 const std::string& extension_id() const { return extension_id_; }
23 const std::string& event_name() const { return event_name_; }
24 const std::string& rule_id() const { return rule_id_; }
25
26 bool operator<(const RuleIdentifier& other) const;
not at google - send to devlin 2012/02/02 11:59:16 why do you need to overload < ?
Aaron Boodman 2012/02/02 16:28:51 It is so that RuleIdentifier can be used with std:
battre 2012/02/02 19:12:36 To store these elements in a std::set.
not at google - send to devlin 2012/02/03 13:06:20 I see. I'm idly wondering whether it's possible t
27 RuleIdentifier& operator=(const RuleIdentifier& other);
not at google - send to devlin 2012/02/02 11:59:16 i don't think you need to override this.
Aaron Boodman 2012/02/02 16:28:51 Not sure about this one. Maybe some other STL cont
battre 2012/02/02 19:12:36 I think the style guide is not exactly clear, but
28 private:
29 std::string extension_id_;
30 std::string event_name_;
31 std::string rule_id_;
32 };
33
34 } // extensions
35
36 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULE_IDENTIFIER_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698