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

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

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: Created 5 years, 8 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
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 "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/plugins/plugin_prefs.h" 9 #include "chrome/browser/plugins/plugin_prefs.h"
10 #include "chrome/browser/profiles/incognito_helpers.h" 10 #include "chrome/browser/profiles/incognito_helpers.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 scoped_refptr<PluginPrefs> plugin_prefs(new PluginPrefs()); 48 scoped_refptr<PluginPrefs> plugin_prefs(new PluginPrefs());
49 plugin_prefs->set_profile(profile->GetOriginalProfile()); 49 plugin_prefs->set_profile(profile->GetOriginalProfile());
50 plugin_prefs->SetPrefs(profile->GetPrefs()); 50 plugin_prefs->SetPrefs(profile->GetPrefs());
51 return plugin_prefs; 51 return plugin_prefs;
52 } 52 }
53 53
54 void PluginPrefsFactory::RegisterProfilePrefs( 54 void PluginPrefsFactory::RegisterProfilePrefs(
55 user_prefs::PrefRegistrySyncable* registry) { 55 user_prefs::PrefRegistrySyncable* registry) {
56 base::FilePath internal_dir; 56 base::FilePath internal_dir;
57 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir); 57 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir);
58 registry->RegisterFilePathPref( 58 registry->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory,
59 prefs::kPluginsLastInternalDirectory, 59 internal_dir);
60 internal_dir, 60 registry->RegisterBooleanPref(prefs::kPluginsMigratedToPepperFlash, false);
61 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
62 registry->RegisterBooleanPref( 61 registry->RegisterBooleanPref(
63 prefs::kPluginsMigratedToPepperFlash, 62 prefs::kPluginsRemovedOldComponentPepperFlashSettings, false);
64 false, 63 registry->RegisterListPref(prefs::kPluginsPluginsList);
65 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 64 registry->RegisterListPref(prefs::kPluginsDisabledPlugins);
66 registry->RegisterBooleanPref( 65 registry->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions);
67 prefs::kPluginsRemovedOldComponentPepperFlashSettings, 66 registry->RegisterListPref(prefs::kPluginsEnabledPlugins);
68 false, 67 registry->RegisterBooleanPref(prefs::kEnableNpapi, false);
69 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
70 registry->RegisterListPref(prefs::kPluginsPluginsList,
71 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
72 registry->RegisterListPref(prefs::kPluginsDisabledPlugins,
73 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
74 registry->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions,
75 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
76 registry->RegisterListPref(prefs::kPluginsEnabledPlugins,
77 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
78 registry->RegisterBooleanPref(
79 prefs::kEnableNpapi,
80 false,
81 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
82 } 68 }
83 69
84 content::BrowserContext* PluginPrefsFactory::GetBrowserContextToUse( 70 content::BrowserContext* PluginPrefsFactory::GetBrowserContextToUse(
85 content::BrowserContext* context) const { 71 content::BrowserContext* context) const {
86 return chrome::GetBrowserContextRedirectedInIncognito(context); 72 return chrome::GetBrowserContextRedirectedInIncognito(context);
87 } 73 }
88 74
89 bool PluginPrefsFactory::ServiceIsNULLWhileTesting() const { 75 bool PluginPrefsFactory::ServiceIsNULLWhileTesting() const {
90 return true; 76 return true;
91 } 77 }
92 78
93 bool PluginPrefsFactory::ServiceIsCreatedWithBrowserContext() const { 79 bool PluginPrefsFactory::ServiceIsCreatedWithBrowserContext() const {
94 return true; 80 return true;
95 } 81 }
OLDNEW
« no previous file with comments | « chrome/browser/pepper_flash_settings_manager.cc ('k') | chrome/browser/policy/cloud/user_policy_signin_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698