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 "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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 | 980 |
981 #if defined(ENABLE_PLUGINS) | 981 #if defined(ENABLE_PLUGINS) |
982 // Enables the plugin power saver feature. | 982 // Enables the plugin power saver feature. |
983 const char kEnablePluginPowerSaver[] = "enable-plugin-power-saver"; | 983 const char kEnablePluginPowerSaver[] = "enable-plugin-power-saver"; |
984 #endif | 984 #endif |
985 | 985 |
986 #if defined(OS_WIN) | 986 #if defined(OS_WIN) |
987 bool IsWin32kRendererLockdownEnabled() { | 987 bool IsWin32kRendererLockdownEnabled() { |
988 const std::string group_name = | 988 const std::string group_name = |
989 base::FieldTrialList::FindFullName("Win32kLockdown"); | 989 base::FieldTrialList::FindFullName("Win32kLockdown"); |
990 const base::CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 990 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
991 if (cmd_line->HasSwitch(kEnableWin32kRendererLockDown)) | 991 if (cmd_line->HasSwitch(kEnableWin32kRendererLockDown)) |
992 return true; | 992 return true; |
993 if (cmd_line->HasSwitch(kDisableWin32kRendererLockDown)) | 993 if (cmd_line->HasSwitch(kDisableWin32kRendererLockDown)) |
994 return false; | 994 return false; |
995 // Default. | 995 // Default. |
996 return group_name == "Enabled"; | 996 return group_name == "Enabled"; |
997 } | 997 } |
998 #endif | 998 #endif |
999 | 999 |
1000 // Don't dump stuff here, follow the same order as the header. | 1000 // Don't dump stuff here, follow the same order as the header. |
1001 | 1001 |
1002 } // namespace switches | 1002 } // namespace switches |
OLD | NEW |