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

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

Issue 2369353002: Adds a pref and a policy to decide if PDFs should always be opened externally. (Closed)
Patch Set: Address comments. Created 4 years, 2 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 "chrome/browser/plugins/plugin_prefs.h" 8 #include "chrome/browser/plugins/plugin_prefs.h"
9 #include "chrome/browser/profiles/incognito_helpers.h" 9 #include "chrome/browser/profiles/incognito_helpers.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(prefs::kPluginsLastInternalDirectory, 58 registry->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory,
59 internal_dir); 59 internal_dir);
60 registry->RegisterListPref(prefs::kPluginsPluginsList); 60 registry->RegisterListPref(prefs::kPluginsPluginsList);
61 registry->RegisterListPref(prefs::kPluginsDisabledPlugins); 61 registry->RegisterListPref(prefs::kPluginsDisabledPlugins);
62 registry->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions); 62 registry->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions);
63 registry->RegisterListPref(prefs::kPluginsEnabledPlugins); 63 registry->RegisterListPref(prefs::kPluginsEnabledPlugins);
64 registry->RegisterBooleanPref(prefs::kPluginsAlwaysOpenPdfExternally, false);
64 } 65 }
65 66
66 content::BrowserContext* PluginPrefsFactory::GetBrowserContextToUse( 67 content::BrowserContext* PluginPrefsFactory::GetBrowserContextToUse(
67 content::BrowserContext* context) const { 68 content::BrowserContext* context) const {
68 return chrome::GetBrowserContextRedirectedInIncognito(context); 69 return chrome::GetBrowserContextRedirectedInIncognito(context);
69 } 70 }
70 71
71 bool PluginPrefsFactory::ServiceIsNULLWhileTesting() const { 72 bool PluginPrefsFactory::ServiceIsNULLWhileTesting() const {
72 return true; 73 return true;
73 } 74 }
74 75
75 bool PluginPrefsFactory::ServiceIsCreatedWithBrowserContext() const { 76 bool PluginPrefsFactory::ServiceIsCreatedWithBrowserContext() const {
76 return true; 77 return true;
77 } 78 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698