Index: chrome/common/chrome_switches.cc |
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc |
index 7cd9088c635a1dfb9acb32a3d9e702f251b62359..5ae262d7dab57b017a34bbc5ced3420465803a4c 100644 |
--- a/chrome/common/chrome_switches.cc |
+++ b/chrome/common/chrome_switches.cc |
@@ -259,6 +259,10 @@ const char kDisableIPv6[] = "disable-ipv6"; |
const char kDisableMinimizeOnSecondLauncherItemClick[] = |
"disable-minimize-on-second-launcher-item-click"; |
+// Disables the new offline error page generated by NetErrorHelper for ChromeOS |
+// and instead uses the old error page generated by OfflineResourceThrottle. |
+const char kDisableNewOfflineErrorPage[] = "disable-new-offline-error-page"; |
+ |
// Disables the menu on the NTP for accessing sessions from other devices. |
const char kDisableNTPOtherSessionsMenu[] = "disable-ntp-other-sessions-menu"; |
@@ -457,6 +461,11 @@ const char kEnableNetBenchmarking[] = "enable-net-benchmarking"; |
// Enables the new bookmark app system. |
const char kEnableNewBookmarkApps[] = "enable-new-bookmark-apps"; |
+// Enables the new offline error page generated by NetErrorHelper for ChromeOS |
+// and disables the use of the old error page generated by |
+// OfflineResourceThrottle. |
+const char kEnableNewOfflineErrorPage[] = "enable-new-offline-error-page"; |
+ |
// Enables NPN with HTTP. It means NPN is enabled but SPDY won't be used. |
// HTTP is still used for all requests. |
const char kEnableNpnHttpOnly[] = "enable-npn-http"; |
@@ -1366,6 +1375,21 @@ bool SettingsWindowEnabled() { |
#endif |
} |
+// Will return true as a default value if neither the |
+// "enable-new-offline-error-page" nor "disable-new-offline-error-page" is |
+// available. |
+bool NewOfflineErrorPageEnabled() { |
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ ::switches::kEnableNewOfflineErrorPage)) |
+ return true; |
+ |
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ ::switches::kDisableNewOfflineErrorPage)) |
+ return false; |
+ |
+ return true; |
+} |
+ |
#if defined(OS_CHROMEOS) |
bool PowerOverlayEnabled() { |
return base::CommandLine::ForCurrentProcess()->HasSwitch( |