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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 "disable-extensions-http-throttling"; | 271 "disable-extensions-http-throttling"; |
272 | 272 |
273 // Disable the behavior that the second click on a launcher item (the click when | 273 // Disable the behavior that the second click on a launcher item (the click when |
274 // the item is already active) minimizes the item. | 274 // the item is already active) minimizes the item. |
275 const char kDisableMinimizeOnSecondLauncherItemClick[] = | 275 const char kDisableMinimizeOnSecondLauncherItemClick[] = |
276 "disable-minimize-on-second-launcher-item-click"; | 276 "disable-minimize-on-second-launcher-item-click"; |
277 | 277 |
278 // Disables the new bookmark app system. | 278 // Disables the new bookmark app system. |
279 const char kDisableNewBookmarkApps[] = "disable-new-bookmark-apps"; | 279 const char kDisableNewBookmarkApps[] = "disable-new-bookmark-apps"; |
280 | 280 |
281 // Disables the new offline error page generated by NetErrorHelper for ChromeOS | |
282 // and instead uses the old error page generated by OfflineResourceThrottle. | |
283 const char kDisableNewOfflineErrorPage[] = "disable-new-offline-error-page"; | |
284 | |
285 // Disable auto-reload of error pages if offline. | 281 // Disable auto-reload of error pages if offline. |
286 const char kDisableOfflineAutoReload[] = "disable-offline-auto-reload"; | 282 const char kDisableOfflineAutoReload[] = "disable-offline-auto-reload"; |
287 | 283 |
288 // Disable only auto-reloading error pages when the tab is visible. | 284 // Disable only auto-reloading error pages when the tab is visible. |
289 const char kDisableOfflineAutoReloadVisibleOnly[] = | 285 const char kDisableOfflineAutoReloadVisibleOnly[] = |
290 "disable-offline-auto-reload-visible-only"; | 286 "disable-offline-auto-reload-visible-only"; |
291 | 287 |
292 // Disable out-of-process V8 proxy resolver. | 288 // Disable out-of-process V8 proxy resolver. |
293 const char kDisableOutOfProcessPac[] = "disable-out-of-process-pac"; | 289 const char kDisableOutOfProcessPac[] = "disable-out-of-process-pac"; |
294 | 290 |
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1351 bool MdSettingsEnabled() { | 1347 bool MdSettingsEnabled() { |
1352 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 1348 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
1353 ::switches::kEnableMaterialDesignSettings); | 1349 ::switches::kEnableMaterialDesignSettings); |
1354 } | 1350 } |
1355 | 1351 |
1356 bool MediaRouterEnabled() { | 1352 bool MediaRouterEnabled() { |
1357 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 1353 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
1358 ::switches::kEnableMediaRouter); | 1354 ::switches::kEnableMediaRouter); |
1359 } | 1355 } |
1360 | 1356 |
1361 // Will return true as a default value if the "disable-new-offline-error-page" | |
1362 // command-line switch is not available. | |
1363 bool NewOfflineErrorPageEnabled() { | |
1364 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | |
1365 ::switches::kDisableNewOfflineErrorPage); | |
1366 } | |
1367 | |
1368 bool PdfMaterialUIEnabled() { | 1357 bool PdfMaterialUIEnabled() { |
1369 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnablePdfMaterialUI)) | 1358 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnablePdfMaterialUI)) |
1370 return true; | 1359 return true; |
1371 | 1360 |
1372 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kDisablePdfMaterialUI)) | 1361 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kDisablePdfMaterialUI)) |
1373 return false; | 1362 return false; |
1374 | 1363 |
1375 // Default. | 1364 // Default. |
1376 return false; | 1365 return false; |
1377 } | 1366 } |
(...skipping 17 matching lines...) Expand all Loading... |
1395 | 1384 |
1396 // ----------------------------------------------------------------------------- | 1385 // ----------------------------------------------------------------------------- |
1397 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. | 1386 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. |
1398 // | 1387 // |
1399 // You were going to just dump your switches here, weren't you? Instead, please | 1388 // You were going to just dump your switches here, weren't you? Instead, please |
1400 // put them in alphabetical order above, or in order inside the appropriate | 1389 // put them in alphabetical order above, or in order inside the appropriate |
1401 // ifdef at the bottom. The order should match the header. | 1390 // ifdef at the bottom. The order should match the header. |
1402 // ----------------------------------------------------------------------------- | 1391 // ----------------------------------------------------------------------------- |
1403 | 1392 |
1404 } // namespace switches | 1393 } // namespace switches |
OLD | NEW |