Chromium Code Reviews| 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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 465 // for 10s, until the buffer is full, or until the next navigation. | 465 // for 10s, until the buffer is full, or until the next navigation. |
| 466 // It only works if a URL was provided by --trace-upload-url. | 466 // It only works if a URL was provided by --trace-upload-url. |
| 467 const char kEnableNavigationTracing[] = "enable-navigation-tracing"; | 467 const char kEnableNavigationTracing[] = "enable-navigation-tracing"; |
| 468 | 468 |
| 469 // Enables the network-related benchmarking extensions. | 469 // Enables the network-related benchmarking extensions. |
| 470 const char kEnableNetBenchmarking[] = "enable-net-benchmarking"; | 470 const char kEnableNetBenchmarking[] = "enable-net-benchmarking"; |
| 471 | 471 |
| 472 // Enables the new bookmark app system. | 472 // Enables the new bookmark app system. |
| 473 const char kEnableNewBookmarkApps[] = "enable-new-bookmark-apps"; | 473 const char kEnableNewBookmarkApps[] = "enable-new-bookmark-apps"; |
| 474 | 474 |
| 475 // Enables the new implementation of the task manager. | |
| 476 const char kEnableNewTaskManager[] = "enable-new-task-manager"; | |
| 477 | |
| 475 // Enable auto-reload of error pages if offline. | 478 // Enable auto-reload of error pages if offline. |
| 476 const char kEnableOfflineAutoReload[] = "enable-offline-auto-reload"; | 479 const char kEnableOfflineAutoReload[] = "enable-offline-auto-reload"; |
| 477 | 480 |
| 478 // Only auto-reload error pages when the tab is visible. | 481 // Only auto-reload error pages when the tab is visible. |
| 479 const char kEnableOfflineAutoReloadVisibleOnly[] = | 482 const char kEnableOfflineAutoReloadVisibleOnly[] = |
| 480 "enable-offline-auto-reload-visible-only"; | 483 "enable-offline-auto-reload-visible-only"; |
| 481 | 484 |
| 482 // Enables panels (always on-top docked pop-up windows). | 485 // Enables panels (always on-top docked pop-up windows). |
| 483 const char kEnablePanels[] = "enable-panels"; | 486 const char kEnablePanels[] = "enable-panels"; |
| 484 | 487 |
| (...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1361 bool MdSettingsEnabled() { | 1364 bool MdSettingsEnabled() { |
| 1362 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 1365 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1363 ::switches::kEnableMaterialDesignSettings); | 1366 ::switches::kEnableMaterialDesignSettings); |
| 1364 } | 1367 } |
| 1365 | 1368 |
| 1366 bool MediaRouterEnabled() { | 1369 bool MediaRouterEnabled() { |
| 1367 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 1370 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1368 ::switches::kEnableMediaRouter); | 1371 ::switches::kEnableMediaRouter); |
| 1369 } | 1372 } |
| 1370 | 1373 |
| 1374 bool NewTaskManagerEnabled() { | |
| 1375 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnableNewTaskManager)) | |
|
Lei Zhang
2015/07/21 21:28:54
Since you are not doing anything fancy, just:
ret
afakhry
2015/07/21 22:16:12
Done.
| |
| 1376 return true; | |
| 1377 | |
| 1378 return false; | |
| 1379 } | |
| 1380 | |
| 1371 bool PdfMaterialUIEnabled() { | 1381 bool PdfMaterialUIEnabled() { |
| 1372 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnablePdfMaterialUI)) | 1382 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnablePdfMaterialUI)) |
| 1373 return true; | 1383 return true; |
| 1374 | 1384 |
| 1375 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kDisablePdfMaterialUI)) | 1385 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kDisablePdfMaterialUI)) |
| 1376 return false; | 1386 return false; |
| 1377 | 1387 |
| 1378 // Default. | 1388 // Default. |
| 1379 return false; | 1389 return false; |
| 1380 } | 1390 } |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 1398 | 1408 |
| 1399 // ----------------------------------------------------------------------------- | 1409 // ----------------------------------------------------------------------------- |
| 1400 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. | 1410 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. |
| 1401 // | 1411 // |
| 1402 // You were going to just dump your switches here, weren't you? Instead, please | 1412 // You were going to just dump your switches here, weren't you? Instead, please |
| 1403 // put them in alphabetical order above, or in order inside the appropriate | 1413 // put them in alphabetical order above, or in order inside the appropriate |
| 1404 // ifdef at the bottom. The order should match the header. | 1414 // ifdef at the bottom. The order should match the header. |
| 1405 // ----------------------------------------------------------------------------- | 1415 // ----------------------------------------------------------------------------- |
| 1406 | 1416 |
| 1407 } // namespace switches | 1417 } // namespace switches |
| OLD | NEW |