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

Side by Side Diff: chrome/common/chrome_switches.cc

Issue 856643002: Viewing cached webpages while offline is not available on Chrome OS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 "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
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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 // Runs the Native Client inside the renderer process and enables GPU plugin 454 // Runs the Native Client inside the renderer process and enables GPU plugin
451 // (internally adds lEnableGpuPlugin to the command line). 455 // (internally adds lEnableGpuPlugin to the command line).
452 const char kEnableNaCl[] = "enable-nacl"; 456 const char kEnableNaCl[] = "enable-nacl";
453 457
454 // Enables the network-related benchmarking extensions. 458 // Enables the network-related benchmarking extensions.
455 const char kEnableNetBenchmarking[] = "enable-net-benchmarking"; 459 const char kEnableNetBenchmarking[] = "enable-net-benchmarking";
456 460
457 // Enables the new bookmark app system. 461 // Enables the new bookmark app system.
458 const char kEnableNewBookmarkApps[] = "enable-new-bookmark-apps"; 462 const char kEnableNewBookmarkApps[] = "enable-new-bookmark-apps";
459 463
464 // Enables the new offline error page generated by NetErrorHelper for ChromeOS
465 // and disables the use of the old error page generated by
466 // OfflineResourceThrottle.
467 const char kEnableNewOfflineErrorPage[] = "enable-new-offline-error-page";
468
460 // Enables NPN with HTTP. It means NPN is enabled but SPDY won't be used. 469 // Enables NPN with HTTP. It means NPN is enabled but SPDY won't be used.
461 // HTTP is still used for all requests. 470 // HTTP is still used for all requests.
462 const char kEnableNpnHttpOnly[] = "enable-npn-http"; 471 const char kEnableNpnHttpOnly[] = "enable-npn-http";
463 472
464 // Enable auto-reload of error pages if offline. 473 // Enable auto-reload of error pages if offline.
465 const char kEnableOfflineAutoReload[] = "enable-offline-auto-reload"; 474 const char kEnableOfflineAutoReload[] = "enable-offline-auto-reload";
466 475
467 // Only auto-reload error pages when the tab is visible. 476 // Only auto-reload error pages when the tab is visible.
468 const char kEnableOfflineAutoReloadVisibleOnly[] = 477 const char kEnableOfflineAutoReloadVisibleOnly[] =
469 "enable-offline-auto-reload-visible-only"; 478 "enable-offline-auto-reload-visible-only";
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 bool SettingsWindowEnabled() { 1368 bool SettingsWindowEnabled() {
1360 #if defined(OS_CHROMEOS) 1369 #if defined(OS_CHROMEOS)
1361 return !base::CommandLine::ForCurrentProcess()->HasSwitch( 1370 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
1362 ::switches::kDisableSettingsWindow); 1371 ::switches::kDisableSettingsWindow);
1363 #else 1372 #else
1364 return base::CommandLine::ForCurrentProcess()->HasSwitch( 1373 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1365 ::switches::kEnableSettingsWindow); 1374 ::switches::kEnableSettingsWindow);
1366 #endif 1375 #endif
1367 } 1376 }
1368 1377
1378 // Will return true as a default value if neither the
1379 // "enable-new-offline-error-page" nor "disable-new-offline-error-page" is
1380 // available.
1381 bool NewOfflineErrorPageEnabled() {
1382 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1383 ::switches::kEnableNewOfflineErrorPage))
1384 return true;
1385
1386 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1387 ::switches::kDisableNewOfflineErrorPage))
1388 return false;
1389
1390 return true;
1391 }
1392
1369 #if defined(OS_CHROMEOS) 1393 #if defined(OS_CHROMEOS)
1370 bool PowerOverlayEnabled() { 1394 bool PowerOverlayEnabled() {
1371 return base::CommandLine::ForCurrentProcess()->HasSwitch( 1395 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1372 ::switches::kEnablePowerOverlay); 1396 ::switches::kEnablePowerOverlay);
1373 } 1397 }
1374 #endif 1398 #endif
1375 1399
1376 // ----------------------------------------------------------------------------- 1400 // -----------------------------------------------------------------------------
1377 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. 1401 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE.
1378 // 1402 //
1379 // You were going to just dump your switches here, weren't you? Instead, please 1403 // You were going to just dump your switches here, weren't you? Instead, please
1380 // put them in alphabetical order above, or in order inside the appropriate 1404 // put them in alphabetical order above, or in order inside the appropriate
1381 // ifdef at the bottom. The order should match the header. 1405 // ifdef at the bottom. The order should match the header.
1382 // ----------------------------------------------------------------------------- 1406 // -----------------------------------------------------------------------------
1383 1407
1384 } // namespace switches 1408 } // namespace switches
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698