| Index: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
|
| diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
|
| index 4f98984b655ec8f960211e6e0deb499cc6e5ab3f..f1459aa1395bef74c0bdda1ad63f58907289528f 100644
|
| --- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
|
| +++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
|
| @@ -29,6 +29,7 @@
|
| #include "chrome/browser/signin/signin_header_helper.h"
|
| #include "chrome/browser/tab_contents/tab_util.h"
|
| #include "chrome/browser/ui/login/login_prompt.h"
|
| +#include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/render_messages.h"
|
| #include "chrome/common/url_constants.h"
|
| #include "components/content_settings/core/browser/host_content_settings_map.h"
|
| @@ -362,7 +363,11 @@ void ChromeResourceDispatcherHostDelegate::RequestBeginning(
|
| #if defined(OS_CHROMEOS)
|
| // Check if we need to add offline throttle. This should be done only
|
| // for main frames.
|
| - if (resource_type == content::RESOURCE_TYPE_MAIN_FRAME) {
|
| + // We will stay away from the old ChromeOS offline error page, if the
|
| + // "enable-new-offline-error-page" flag is enabled.
|
| + bool new_error_page_enabled = switches::NewOfflineErrorPageEnabled();
|
| + if (!new_error_page_enabled &&
|
| + resource_type == content::RESOURCE_TYPE_MAIN_FRAME) {
|
| // We check offline first, then check safe browsing so that we still can
|
| // block unsafe site after we remove offline page.
|
| throttles->push_back(new OfflineResourceThrottle(request,
|
|
|