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

Side by Side Diff: chrome/browser/extensions/api/declarative/rules_registry.cc

Issue 147923005: Split ExtensionSystem interface from ExtensionSystemImpl implementation, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re^3base Created 6 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
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 "chrome/browser/extensions/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" 17 #include "chrome/browser/chrome_notification_types.h"
18 #include "chrome/browser/extensions/api/declarative/rules_cache_delegate.h" 18 #include "chrome/browser/extensions/api/declarative/rules_cache_delegate.h"
19 #include "chrome/browser/extensions/extension_service.h" 19 #include "chrome/browser/extensions/extension_service.h"
20 #include "chrome/browser/extensions/extension_system.h"
21 #include "chrome/browser/extensions/extension_util.h" 20 #include "chrome/browser/extensions/extension_util.h"
22 #include "chrome/browser/extensions/state_store.h" 21 #include "chrome/browser/extensions/state_store.h"
23 #include "chrome/browser/profiles/profile.h" 22 #include "chrome/browser/profiles/profile.h"
24 #include "content/public/browser/browser_thread.h" 23 #include "content/public/browser/browser_thread.h"
25 #include "content/public/browser/notification_details.h" 24 #include "content/public/browser/notification_details.h"
26 #include "content/public/browser/notification_source.h" 25 #include "content/public/browser/notification_source.h"
27 #include "extensions/browser/extension_prefs.h" 26 #include "extensions/browser/extension_prefs.h"
27 #include "extensions/browser/extension_system.h"
28 #include "extensions/common/extension.h" 28 #include "extensions/common/extension.h"
29 29
30 namespace { 30 namespace {
31 31
32 const char kSuccess[] = ""; 32 const char kSuccess[] = "";
33 const char kDuplicateRuleId[] = "Duplicate rule ID: %s"; 33 const char kDuplicateRuleId[] = "Duplicate rule ID: %s";
34 34
35 scoped_ptr<base::Value> RulesToValue( 35 scoped_ptr<base::Value> RulesToValue(
36 const std::vector<linked_ptr<extensions::RulesRegistry::Rule> >& rules) { 36 const std::vector<linked_ptr<extensions::RulesRegistry::Rule> >& rules) {
37 scoped_ptr<base::ListValue> list(new base::ListValue()); 37 scoped_ptr<base::ListValue> list(new base::ListValue());
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 for (i = identifiers.begin(); i != identifiers.end(); ++i) 372 for (i = identifiers.begin(); i != identifiers.end(); ++i)
373 used_rule_identifiers_[extension_id].erase(*i); 373 used_rule_identifiers_[extension_id].erase(*i);
374 } 374 }
375 375
376 void RulesRegistry::RemoveAllUsedRuleIdentifiers( 376 void RulesRegistry::RemoveAllUsedRuleIdentifiers(
377 const std::string& extension_id) { 377 const std::string& extension_id) {
378 used_rule_identifiers_.erase(extension_id); 378 used_rule_identifiers_.erase(extension_id);
379 } 379 }
380 380
381 } // namespace extensions 381 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698