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

Side by Side Diff: chrome/browser/plugins/plugin_prefs_factory.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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 (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/plugins/plugin_prefs_factory.h" 5 #include "chrome/browser/plugins/plugin_prefs_factory.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "chrome/browser/plugins/plugin_prefs.h" 8 #include "chrome/browser/plugins/plugin_prefs.h"
9 #include "chrome/browser/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 29 matching lines...) Expand all
40 PluginPrefsFactory::~PluginPrefsFactory() {} 40 PluginPrefsFactory::~PluginPrefsFactory() {}
41 41
42 scoped_refptr<RefcountedProfileKeyedService> 42 scoped_refptr<RefcountedProfileKeyedService>
43 PluginPrefsFactory::BuildServiceInstanceFor(Profile* profile) const { 43 PluginPrefsFactory::BuildServiceInstanceFor(Profile* profile) const {
44 scoped_refptr<PluginPrefs> plugin_prefs(new PluginPrefs()); 44 scoped_refptr<PluginPrefs> plugin_prefs(new PluginPrefs());
45 plugin_prefs->set_profile(profile->GetOriginalProfile()); 45 plugin_prefs->set_profile(profile->GetOriginalProfile());
46 plugin_prefs->SetPrefs(profile->GetPrefs()); 46 plugin_prefs->SetPrefs(profile->GetPrefs());
47 return plugin_prefs; 47 return plugin_prefs;
48 } 48 }
49 49
50 void PluginPrefsFactory::RegisterUserPrefs(PrefService* prefs) { 50 void PluginPrefsFactory::RegisterUserPrefs(PrefServiceSyncable* prefs) {
51 FilePath internal_dir; 51 FilePath internal_dir;
52 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir); 52 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir);
53 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory, 53 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory,
54 internal_dir, 54 internal_dir,
55 PrefService::UNSYNCABLE_PREF); 55 PrefServiceSyncable::UNSYNCABLE_PREF);
56 prefs->RegisterBooleanPref(prefs::kPluginsEnabledInternalPDF, 56 prefs->RegisterBooleanPref(prefs::kPluginsEnabledInternalPDF,
57 false, 57 false,
58 PrefService::UNSYNCABLE_PREF); 58 PrefServiceSyncable::UNSYNCABLE_PREF);
59 prefs->RegisterBooleanPref(prefs::kPluginsEnabledNaCl, 59 prefs->RegisterBooleanPref(prefs::kPluginsEnabledNaCl,
60 false, 60 false,
61 PrefService::UNSYNCABLE_PREF); 61 PrefServiceSyncable::UNSYNCABLE_PREF);
62 prefs->RegisterBooleanPref(prefs::kPluginsMigratedToPepperFlash, 62 prefs->RegisterBooleanPref(prefs::kPluginsMigratedToPepperFlash,
63 false, 63 false,
64 PrefService::UNSYNCABLE_PREF); 64 PrefServiceSyncable::UNSYNCABLE_PREF);
65 prefs->RegisterListPref(prefs::kPluginsPluginsList, 65 prefs->RegisterListPref(prefs::kPluginsPluginsList,
66 PrefService::UNSYNCABLE_PREF); 66 PrefServiceSyncable::UNSYNCABLE_PREF);
67 prefs->RegisterListPref(prefs::kPluginsDisabledPlugins, 67 prefs->RegisterListPref(prefs::kPluginsDisabledPlugins,
68 PrefService::UNSYNCABLE_PREF); 68 PrefServiceSyncable::UNSYNCABLE_PREF);
69 prefs->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions, 69 prefs->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions,
70 PrefService::UNSYNCABLE_PREF); 70 PrefServiceSyncable::UNSYNCABLE_PREF);
71 prefs->RegisterListPref(prefs::kPluginsEnabledPlugins, 71 prefs->RegisterListPref(prefs::kPluginsEnabledPlugins,
72 PrefService::UNSYNCABLE_PREF); 72 PrefServiceSyncable::UNSYNCABLE_PREF);
73 } 73 }
74 74
75 bool PluginPrefsFactory::ServiceRedirectedInIncognito() const { 75 bool PluginPrefsFactory::ServiceRedirectedInIncognito() const {
76 return true; 76 return true;
77 } 77 }
78 78
79 bool PluginPrefsFactory::ServiceIsNULLWhileTesting() const { 79 bool PluginPrefsFactory::ServiceIsNULLWhileTesting() const {
80 return true; 80 return true;
81 } 81 }
82 82
83 bool PluginPrefsFactory::ServiceIsCreatedWithProfile() const { 83 bool PluginPrefsFactory::ServiceIsCreatedWithProfile() const {
84 return true; 84 return true;
85 } 85 }
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_prefs_factory.h ('k') | chrome/browser/policy/auto_enrollment_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698