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

Side by Side Diff: chrome/browser/extensions/plugin_manager.cc

Issue 178193030: Rename ProfileKeyedAPI to BrowserContextKeyedAPI and GetProfile to Get. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 6 years, 9 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 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 20 matching lines...) Expand all
31 chrome::NOTIFICATION_EXTENSION_LOADED, 31 chrome::NOTIFICATION_EXTENSION_LOADED,
32 content::Source<Profile>(profile_)); 32 content::Source<Profile>(profile_));
33 registrar_.Add(this, 33 registrar_.Add(this,
34 chrome::NOTIFICATION_EXTENSION_UNLOADED, 34 chrome::NOTIFICATION_EXTENSION_UNLOADED,
35 content::Source<Profile>(profile_)); 35 content::Source<Profile>(profile_));
36 } 36 }
37 37
38 PluginManager::~PluginManager() { 38 PluginManager::~PluginManager() {
39 } 39 }
40 40
41 static base::LazyInstance<ProfileKeyedAPIFactory<PluginManager> > 41 static base::LazyInstance<BrowserContextKeyedAPIFactory<PluginManager> >
42 g_factory = LAZY_INSTANCE_INITIALIZER; 42 g_factory = LAZY_INSTANCE_INITIALIZER;
43 43
44 // static 44 // static
45 ProfileKeyedAPIFactory<PluginManager>* PluginManager::GetFactoryInstance() { 45 BrowserContextKeyedAPIFactory<PluginManager>*
46 PluginManager::GetFactoryInstance() {
46 return g_factory.Pointer(); 47 return g_factory.Pointer();
47 } 48 }
48 49
49 void PluginManager::Observe(int type, 50 void PluginManager::Observe(int type,
50 const content::NotificationSource& source, 51 const content::NotificationSource& source,
51 const content::NotificationDetails& details) { 52 const content::NotificationDetails& details) {
52 if (type == chrome::NOTIFICATION_EXTENSION_LOADED) { 53 if (type == chrome::NOTIFICATION_EXTENSION_LOADED) {
53 const Extension* extension = 54 const Extension* extension =
54 content::Details<const Extension>(details).ptr(); 55 content::Details<const Extension>(details).ptr();
55 56
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 NaClModuleInfo::List::iterator PluginManager::FindNaClModule(const GURL& url) { 190 NaClModuleInfo::List::iterator PluginManager::FindNaClModule(const GURL& url) {
190 for (NaClModuleInfo::List::iterator iter = nacl_module_list_.begin(); 191 for (NaClModuleInfo::List::iterator iter = nacl_module_list_.begin();
191 iter != nacl_module_list_.end(); ++iter) { 192 iter != nacl_module_list_.end(); ++iter) {
192 if (iter->url == url) 193 if (iter->url == url)
193 return iter; 194 return iter;
194 } 195 }
195 return nacl_module_list_.end(); 196 return nacl_module_list_.end();
196 } 197 }
197 198
198 } // namespace extensions 199 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/plugin_manager.h ('k') | chrome/browser/extensions/signin/gaia_auth_extension_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698