OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
6 #include "base/lazy_instance.h" | 6 #include "base/lazy_instance.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/extensions/plugin_manager.h" | 10 #include "chrome/browser/extensions/plugin_manager.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 PluginManager::PluginManager(content::BrowserContext* context) | 30 PluginManager::PluginManager(content::BrowserContext* context) |
31 : profile_(Profile::FromBrowserContext(context)), | 31 : profile_(Profile::FromBrowserContext(context)), |
32 extension_registry_observer_(this) { | 32 extension_registry_observer_(this) { |
33 extension_registry_observer_.Add(ExtensionRegistry::Get(profile_)); | 33 extension_registry_observer_.Add(ExtensionRegistry::Get(profile_)); |
34 } | 34 } |
35 | 35 |
36 PluginManager::~PluginManager() { | 36 PluginManager::~PluginManager() { |
37 } | 37 } |
38 | 38 |
39 static base::LazyInstance<BrowserContextKeyedAPIFactory<PluginManager> > | 39 static base::LazyInstance< |
40 g_factory = LAZY_INSTANCE_INITIALIZER; | 40 BrowserContextKeyedAPIFactory<PluginManager>>::DestructorAtExit g_factory = |
| 41 LAZY_INSTANCE_INITIALIZER; |
41 | 42 |
42 // static | 43 // static |
43 BrowserContextKeyedAPIFactory<PluginManager>* | 44 BrowserContextKeyedAPIFactory<PluginManager>* |
44 PluginManager::GetFactoryInstance() { | 45 PluginManager::GetFactoryInstance() { |
45 return g_factory.Pointer(); | 46 return g_factory.Pointer(); |
46 } | 47 } |
47 | 48 |
48 void PluginManager::OnExtensionLoaded(content::BrowserContext* browser_context, | 49 void PluginManager::OnExtensionLoaded(content::BrowserContext* browser_context, |
49 const Extension* extension) { | 50 const Extension* extension) { |
50 bool plugins_or_nacl_changed = false; | 51 bool plugins_or_nacl_changed = false; |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 iter != nacl_module_list_.end(); ++iter) { | 190 iter != nacl_module_list_.end(); ++iter) { |
190 if (iter->url == url) | 191 if (iter->url == url) |
191 return iter; | 192 return iter; |
192 } | 193 } |
193 return nacl_module_list_.end(); | 194 return nacl_module_list_.end(); |
194 } | 195 } |
195 | 196 |
196 #endif // !defined(DISABLE_NACL) | 197 #endif // !defined(DISABLE_NACL) |
197 | 198 |
198 } // namespace extensions | 199 } // namespace extensions |
OLD | NEW |