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

Unified Diff: chrome/browser/plugin_prefs.cc

Issue 9703038: Profiles: Really fix refcounted services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgot to save a file. >_< Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/plugin_prefs.h ('k') | chrome/browser/plugin_prefs_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_prefs.cc
diff --git a/chrome/browser/plugin_prefs.cc b/chrome/browser/plugin_prefs.cc
index 4796b89df3881f82069c3c96374c27e23721d76b..6b1264b28ed069646533c2598cc91ad70b3c10f6 100644
--- a/chrome/browser/plugin_prefs.cc
+++ b/chrome/browser/plugin_prefs.cc
@@ -52,16 +52,16 @@ base::LazyInstance<std::map<FilePath, bool> > g_default_plugin_state =
#define kPluginUpdateDelayMs (60 * 1000)
// static
-PluginPrefs* PluginPrefs::GetForProfile(Profile* profile) {
- return PluginPrefsFactory::GetInstance()->GetPrefsForProfile(profile);
+scoped_refptr<PluginPrefs> PluginPrefs::GetForProfile(Profile* profile) {
+ return PluginPrefsFactory::GetPrefsForProfile(profile);
}
// static
-PluginPrefs* PluginPrefs::GetForTestingProfile(Profile* profile) {
- ProfileKeyedBase* prefs =
+scoped_refptr<PluginPrefs> PluginPrefs::GetForTestingProfile(
+ Profile* profile) {
+ return static_cast<PluginPrefs*>(
PluginPrefsFactory::GetInstance()->SetTestingFactoryAndUse(
- profile, &PluginPrefsFactory::CreatePrefsForProfile);
- return static_cast<PluginPrefs*>(prefs);
+ profile, &PluginPrefsFactory::CreateForTestingProfile).get());
}
void PluginPrefs::SetPluginListForTesting(
« no previous file with comments | « chrome/browser/plugin_prefs.h ('k') | chrome/browser/plugin_prefs_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698