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_service.h" | 5 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 void RegisterToExtensionWebRequestEventRouterOnIO( | 26 void RegisterToExtensionWebRequestEventRouterOnIO( |
27 void* profile, | 27 void* profile, |
28 scoped_refptr<WebRequestRulesRegistry> web_request_rules_registry) { | 28 scoped_refptr<WebRequestRulesRegistry> web_request_rules_registry) { |
29 ExtensionWebRequestEventRouter::GetInstance()->RegisterRulesRegistry( | 29 ExtensionWebRequestEventRouter::GetInstance()->RegisterRulesRegistry( |
30 profile, web_request_rules_registry); | 30 profile, web_request_rules_registry); |
31 } | 31 } |
32 | 32 |
33 } // namespace | 33 } // namespace |
34 | 34 |
35 RulesRegistryService::RulesRegistryService(Profile* profile) | 35 RulesRegistryService::RulesRegistryService(Profile* profile) |
36 : profile_(profile) { | 36 : content_rules_registry_(NULL), |
| 37 profile_(profile) { |
37 if (profile) { | 38 if (profile) { |
38 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, | 39 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, |
39 content::Source<Profile>(profile->GetOriginalProfile())); | 40 content::Source<Profile>(profile->GetOriginalProfile())); |
40 RegisterDefaultRulesRegistries(); | 41 RegisterDefaultRulesRegistries(); |
41 } | 42 } |
42 } | 43 } |
43 | 44 |
44 RulesRegistryService::~RulesRegistryService() {} | 45 RulesRegistryService::~RulesRegistryService() {} |
45 | 46 |
46 void RulesRegistryService::RegisterDefaultRulesRegistries() { | 47 void RulesRegistryService::RegisterDefaultRulesRegistries() { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 OnExtensionUnloaded(extension->id()); | 136 OnExtensionUnloaded(extension->id()); |
136 break; | 137 break; |
137 } | 138 } |
138 default: | 139 default: |
139 NOTREACHED(); | 140 NOTREACHED(); |
140 break; | 141 break; |
141 } | 142 } |
142 } | 143 } |
143 | 144 |
144 } // namespace extensions | 145 } // namespace extensions |
OLD | NEW |