OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/extensions/api/declarative/initializing_rules_registry.
h" | 5 #include "chrome/browser/extensions/api/declarative/initializing_rules_registry.
h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 | 10 |
11 namespace { | 11 namespace { |
12 std::string ToId(int identifier) { | 12 std::string ToId(int identifier) { |
13 return StringPrintf("_%d_", identifier); | 13 return base::StringPrintf("_%d_", identifier); |
14 } | 14 } |
15 } // namespace | 15 } // namespace |
16 | 16 |
17 namespace extensions { | 17 namespace extensions { |
18 | 18 |
19 InitializingRulesRegistry::InitializingRulesRegistry( | 19 InitializingRulesRegistry::InitializingRulesRegistry( |
20 scoped_refptr<RulesRegistry> delegate) | 20 scoped_refptr<RulesRegistry> delegate) |
21 : delegate_(delegate), | 21 : delegate_(delegate), |
22 last_generated_rule_identifier_id_(0) { | 22 last_generated_rule_identifier_id_(0) { |
23 } | 23 } |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 for (i = identifiers.begin(); i != identifiers.end(); ++i) | 141 for (i = identifiers.begin(); i != identifiers.end(); ++i) |
142 used_rule_identifiers_[extension_id].erase(*i); | 142 used_rule_identifiers_[extension_id].erase(*i); |
143 } | 143 } |
144 | 144 |
145 void InitializingRulesRegistry::RemoveAllUsedRuleIdentifiers( | 145 void InitializingRulesRegistry::RemoveAllUsedRuleIdentifiers( |
146 const std::string& extension_id) { | 146 const std::string& extension_id) { |
147 used_rule_identifiers_.erase(extension_id); | 147 used_rule_identifiers_.erase(extension_id); |
148 } | 148 } |
149 | 149 |
150 } // namespace extensions | 150 } // namespace extensions |
OLD | NEW |