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/common/chrome_switches.h" | 5 #include "chrome/common/chrome_switches.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 | 9 |
10 namespace switches { | 10 namespace switches { |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 // issues relating to IPv6, but shouldn't otherwise be needed. Be sure to file | 252 // issues relating to IPv6, but shouldn't otherwise be needed. Be sure to file |
253 // bugs if something isn't working properly in the presence of IPv6. This flag | 253 // bugs if something isn't working properly in the presence of IPv6. This flag |
254 // can be overidden by the "enable-ipv6" flag. | 254 // can be overidden by the "enable-ipv6" flag. |
255 const char kDisableIPv6[] = "disable-ipv6"; | 255 const char kDisableIPv6[] = "disable-ipv6"; |
256 | 256 |
257 // Disable the behavior that the second click on a launcher item (the click when | 257 // Disable the behavior that the second click on a launcher item (the click when |
258 // the item is already active) minimizes the item. | 258 // the item is already active) minimizes the item. |
259 const char kDisableMinimizeOnSecondLauncherItemClick[] = | 259 const char kDisableMinimizeOnSecondLauncherItemClick[] = |
260 "disable-minimize-on-second-launcher-item-click"; | 260 "disable-minimize-on-second-launcher-item-click"; |
261 | 261 |
| 262 // Disables the new offline error page generated by NetErrorHelper for ChromeOS |
| 263 // and instead uses the old error page generated by OfflineResourceThrottle. |
| 264 const char kDisableNewOfflineErrorPage[] = "disable-new-offline-error-page"; |
| 265 |
262 // Disables the menu on the NTP for accessing sessions from other devices. | 266 // Disables the menu on the NTP for accessing sessions from other devices. |
263 const char kDisableNTPOtherSessionsMenu[] = "disable-ntp-other-sessions-menu"; | 267 const char kDisableNTPOtherSessionsMenu[] = "disable-ntp-other-sessions-menu"; |
264 | 268 |
265 // Disable auto-reload of error pages if offline. | 269 // Disable auto-reload of error pages if offline. |
266 const char kDisableOfflineAutoReload[] = "disable-offline-auto-reload"; | 270 const char kDisableOfflineAutoReload[] = "disable-offline-auto-reload"; |
267 | 271 |
268 // Disable only auto-reloading error pages when the tab is visible. | 272 // Disable only auto-reloading error pages when the tab is visible. |
269 const char kDisableOfflineAutoReloadVisibleOnly[] = | 273 const char kDisableOfflineAutoReloadVisibleOnly[] = |
270 "disable-offline-auto-reload-visible-only"; | 274 "disable-offline-auto-reload-visible-only"; |
271 | 275 |
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1365 bool SettingsWindowEnabled() { | 1369 bool SettingsWindowEnabled() { |
1366 #if defined(OS_CHROMEOS) | 1370 #if defined(OS_CHROMEOS) |
1367 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 1371 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
1368 ::switches::kDisableSettingsWindow); | 1372 ::switches::kDisableSettingsWindow); |
1369 #else | 1373 #else |
1370 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 1374 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
1371 ::switches::kEnableSettingsWindow); | 1375 ::switches::kEnableSettingsWindow); |
1372 #endif | 1376 #endif |
1373 } | 1377 } |
1374 | 1378 |
| 1379 // Will return true as a default value if the "disable-new-offline-error-page" |
| 1380 // command-line switch is not available. |
| 1381 bool NewOfflineErrorPageEnabled() { |
| 1382 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1383 ::switches::kDisableNewOfflineErrorPage); |
| 1384 } |
| 1385 |
1375 #if defined(OS_CHROMEOS) | 1386 #if defined(OS_CHROMEOS) |
1376 bool PowerOverlayEnabled() { | 1387 bool PowerOverlayEnabled() { |
1377 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 1388 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
1378 ::switches::kEnablePowerOverlay); | 1389 ::switches::kEnablePowerOverlay); |
1379 } | 1390 } |
1380 #endif | 1391 #endif |
1381 | 1392 |
1382 // ----------------------------------------------------------------------------- | 1393 // ----------------------------------------------------------------------------- |
1383 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. | 1394 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. |
1384 // | 1395 // |
1385 // You were going to just dump your switches here, weren't you? Instead, please | 1396 // You were going to just dump your switches here, weren't you? Instead, please |
1386 // put them in alphabetical order above, or in order inside the appropriate | 1397 // put them in alphabetical order above, or in order inside the appropriate |
1387 // ifdef at the bottom. The order should match the header. | 1398 // ifdef at the bottom. The order should match the header. |
1388 // ----------------------------------------------------------------------------- | 1399 // ----------------------------------------------------------------------------- |
1389 | 1400 |
1390 } // namespace switches | 1401 } // namespace switches |
OLD | NEW |