| 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/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/extensions/plugin_manager.h" | 10 #include "chrome/browser/extensions/plugin_manager.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 } | 33 } |
| 34 | 34 |
| 35 PluginManager::~PluginManager() { | 35 PluginManager::~PluginManager() { |
| 36 } | 36 } |
| 37 | 37 |
| 38 static base::LazyInstance<ProfileKeyedAPIFactory<PluginManager> > | 38 static base::LazyInstance<ProfileKeyedAPIFactory<PluginManager> > |
| 39 g_factory = LAZY_INSTANCE_INITIALIZER; | 39 g_factory = LAZY_INSTANCE_INITIALIZER; |
| 40 | 40 |
| 41 // static | 41 // static |
| 42 ProfileKeyedAPIFactory<PluginManager>* PluginManager::GetFactoryInstance() { | 42 ProfileKeyedAPIFactory<PluginManager>* PluginManager::GetFactoryInstance() { |
| 43 return &g_factory.Get(); | 43 return g_factory.Pointer(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 void PluginManager::Observe(int type, | 46 void PluginManager::Observe(int type, |
| 47 const content::NotificationSource& source, | 47 const content::NotificationSource& source, |
| 48 const content::NotificationDetails& details) { | 48 const content::NotificationDetails& details) { |
| 49 if (type == chrome::NOTIFICATION_EXTENSION_LOADED) { | 49 if (type == chrome::NOTIFICATION_EXTENSION_LOADED) { |
| 50 const Extension* extension = | 50 const Extension* extension = |
| 51 content::Details<const Extension>(details).ptr(); | 51 content::Details<const Extension>(details).ptr(); |
| 52 | 52 |
| 53 bool plugins_or_nacl_changed = false; | 53 bool plugins_or_nacl_changed = false; |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 NaClModuleInfo::List::iterator PluginManager::FindNaClModule(const GURL& url) { | 186 NaClModuleInfo::List::iterator PluginManager::FindNaClModule(const GURL& url) { |
| 187 for (NaClModuleInfo::List::iterator iter = nacl_module_list_.begin(); | 187 for (NaClModuleInfo::List::iterator iter = nacl_module_list_.begin(); |
| 188 iter != nacl_module_list_.end(); ++iter) { | 188 iter != nacl_module_list_.end(); ++iter) { |
| 189 if (iter->url == url) | 189 if (iter->url == url) |
| 190 return iter; | 190 return iter; |
| 191 } | 191 } |
| 192 return nacl_module_list_.end(); | 192 return nacl_module_list_.end(); |
| 193 } | 193 } |
| 194 | 194 |
| 195 } // namespace extensions | 195 } // namespace extensions |
| OLD | NEW |