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/rules_registry.h" | 5 #include "extensions/browser/api/declarative/rules_registry.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
13 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "base/values.h" | 16 #include "base/values.h" |
17 #include "chrome/browser/chrome_notification_types.h" | |
18 #include "chrome/browser/extensions/api/declarative/rules_cache_delegate.h" | |
19 #include "chrome/browser/extensions/extension_service.h" | |
20 #include "chrome/browser/extensions/extension_util.h" | |
21 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
22 #include "content/public/browser/notification_details.h" | 18 #include "content/public/browser/notification_details.h" |
23 #include "content/public/browser/notification_source.h" | 19 #include "content/public/browser/notification_source.h" |
| 20 #include "extensions/browser/api/declarative/rules_cache_delegate.h" |
24 #include "extensions/browser/extension_prefs.h" | 21 #include "extensions/browser/extension_prefs.h" |
25 #include "extensions/browser/extension_system.h" | 22 #include "extensions/browser/extension_system.h" |
26 #include "extensions/browser/state_store.h" | 23 #include "extensions/browser/state_store.h" |
27 #include "extensions/common/extension.h" | 24 #include "extensions/common/extension.h" |
28 | 25 |
29 namespace { | 26 namespace { |
30 | 27 |
31 const char kSuccess[] = ""; | 28 const char kSuccess[] = ""; |
32 const char kDuplicateRuleId[] = "Duplicate rule ID: %s"; | 29 const char kDuplicateRuleId[] = "Duplicate rule ID: %s"; |
33 | 30 |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 for (i = identifiers.begin(); i != identifiers.end(); ++i) | 368 for (i = identifiers.begin(); i != identifiers.end(); ++i) |
372 used_rule_identifiers_[extension_id].erase(*i); | 369 used_rule_identifiers_[extension_id].erase(*i); |
373 } | 370 } |
374 | 371 |
375 void RulesRegistry::RemoveAllUsedRuleIdentifiers( | 372 void RulesRegistry::RemoveAllUsedRuleIdentifiers( |
376 const std::string& extension_id) { | 373 const std::string& extension_id) { |
377 used_rule_identifiers_.erase(extension_id); | 374 used_rule_identifiers_.erase(extension_id); |
378 } | 375 } |
379 | 376 |
380 } // namespace extensions | 377 } // namespace extensions |
OLD | NEW |