| OLD | NEW |
| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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( |
| 59 prefs::kPluginsLastInternalDirectory, | 59 prefs::kPluginsLastInternalDirectory, |
| 60 internal_dir, | 60 internal_dir, |
| 61 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 61 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 62 registry->RegisterBooleanPref( | 62 registry->RegisterBooleanPref( |
| 63 prefs::kPluginsEnabledNaCl, | |
| 64 false, | |
| 65 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | |
| 66 registry->RegisterBooleanPref( | |
| 67 prefs::kPluginsMigratedToPepperFlash, | 63 prefs::kPluginsMigratedToPepperFlash, |
| 68 false, | 64 false, |
| 69 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 65 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 70 registry->RegisterBooleanPref( | 66 registry->RegisterBooleanPref( |
| 71 prefs::kPluginsRemovedOldComponentPepperFlashSettings, | 67 prefs::kPluginsRemovedOldComponentPepperFlashSettings, |
| 72 false, | 68 false, |
| 73 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 69 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 74 registry->RegisterListPref(prefs::kPluginsPluginsList, | 70 registry->RegisterListPref(prefs::kPluginsPluginsList, |
| 75 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 71 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 76 registry->RegisterListPref(prefs::kPluginsDisabledPlugins, | 72 registry->RegisterListPref(prefs::kPluginsDisabledPlugins, |
| 77 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 73 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 78 registry->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions, | 74 registry->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions, |
| 79 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 75 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 80 registry->RegisterListPref(prefs::kPluginsEnabledPlugins, | 76 registry->RegisterListPref(prefs::kPluginsEnabledPlugins, |
| 81 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 77 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 82 } | 78 } |
| 83 | 79 |
| 84 content::BrowserContext* PluginPrefsFactory::GetBrowserContextToUse( | 80 content::BrowserContext* PluginPrefsFactory::GetBrowserContextToUse( |
| 85 content::BrowserContext* context) const { | 81 content::BrowserContext* context) const { |
| 86 return chrome::GetBrowserContextRedirectedInIncognito(context); | 82 return chrome::GetBrowserContextRedirectedInIncognito(context); |
| 87 } | 83 } |
| 88 | 84 |
| 89 bool PluginPrefsFactory::ServiceIsNULLWhileTesting() const { | 85 bool PluginPrefsFactory::ServiceIsNULLWhileTesting() const { |
| 90 return true; | 86 return true; |
| 91 } | 87 } |
| 92 | 88 |
| 93 bool PluginPrefsFactory::ServiceIsCreatedWithBrowserContext() const { | 89 bool PluginPrefsFactory::ServiceIsCreatedWithBrowserContext() const { |
| 94 return true; | 90 return true; |
| 95 } | 91 } |
| OLD | NEW |