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

Side by Side Diff: content/public/common/content_switches.cc

Issue 645203002: Block NPAPI plugins by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move UMA outside ifdef Created 5 years, 11 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
« no previous file with comments | « content/public/common/content_switches.h ('k') | content/shell/app/shell_main_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/public/common/content_switches.h" 5 #include "content/public/common/content_switches.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 9
10 namespace switches { 10 namespace switches {
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 "disable-win32k-renderer-lockdown"; 948 "disable-win32k-renderer-lockdown";
949 const char kEnableWin32kRendererLockDown[] = 949 const char kEnableWin32kRendererLockDown[] =
950 "enable-win32k-renderer-lockdown"; 950 "enable-win32k-renderer-lockdown";
951 951
952 // DirectWrite FontCache is shared by browser to renderers using shared memory. 952 // DirectWrite FontCache is shared by browser to renderers using shared memory.
953 // This switch allows specifying suffix to shared memory section name to avoid 953 // This switch allows specifying suffix to shared memory section name to avoid
954 // clashes between different instances of Chrome. 954 // clashes between different instances of Chrome.
955 const char kFontCacheSharedMemSuffix[] = "font-cache-shared-mem-suffix"; 955 const char kFontCacheSharedMemSuffix[] = "font-cache-shared-mem-suffix";
956 #endif 956 #endif
957 957
958 // Enables the use of NPAPI plugins.
959 const char kEnableNpapi[] = "enable-npapi";
960
958 #if defined(ENABLE_PLUGINS) 961 #if defined(ENABLE_PLUGINS)
959 // Enables the plugin power saver feature. 962 // Enables the plugin power saver feature.
960 const char kEnablePluginPowerSaver[] = "enable-plugin-power-saver"; 963 const char kEnablePluginPowerSaver[] = "enable-plugin-power-saver";
961 #endif 964 #endif
962 965
963 #if defined(OS_WIN) 966 #if defined(OS_WIN)
964 bool IsWin32kRendererLockdownEnabled() { 967 bool IsWin32kRendererLockdownEnabled() {
965 const std::string group_name = 968 const std::string group_name =
966 base::FieldTrialList::FindFullName("Win32kLockdown"); 969 base::FieldTrialList::FindFullName("Win32kLockdown");
967 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); 970 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
968 if (cmd_line->HasSwitch(kEnableWin32kRendererLockDown)) 971 if (cmd_line->HasSwitch(kEnableWin32kRendererLockDown))
969 return true; 972 return true;
970 if (cmd_line->HasSwitch(kDisableWin32kRendererLockDown)) 973 if (cmd_line->HasSwitch(kDisableWin32kRendererLockDown))
971 return false; 974 return false;
972 // Default. 975 // Default.
973 return group_name == "Enabled"; 976 return group_name == "Enabled";
974 } 977 }
975 #endif 978 #endif
976 979
977 // Don't dump stuff here, follow the same order as the header. 980 // Don't dump stuff here, follow the same order as the header.
978 981
979 } // namespace switches 982 } // namespace switches
OLDNEW
« no previous file with comments | « content/public/common/content_switches.h ('k') | content/shell/app/shell_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698