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

Side by Side Diff: content/browser/webui/url_data_manager_backend.cc

Issue 2498663002: Add chrome://dino short URL to link to the internet disconnected network error interstitial (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « chrome/common/url_constants.cc ('k') | content/public/common/url_constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/browser/webui/url_data_manager_backend.h" 5 #include "content/browser/webui/url_data_manager_backend.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 if (base::StringToInt(error_code_string, &error_code)) { 575 if (base::StringToInt(error_code_string, &error_code)) {
576 // Check for a valid error code. 576 // Check for a valid error code.
577 if (IsValidNetworkErrorCode(error_code) && 577 if (IsValidNetworkErrorCode(error_code) &&
578 error_code != net::Error::ERR_IO_PENDING) { 578 error_code != net::Error::ERR_IO_PENDING) {
579 return new net::URLRequestErrorJob(request, network_delegate, 579 return new net::URLRequestErrorJob(request, network_delegate,
580 error_code); 580 error_code);
581 } 581 }
582 } 582 }
583 } 583 }
584 584
585 // Check for chrome://dino which is an alias for chrome://network-error/-106
586 if (request->url().SchemeIs(kChromeUIScheme) &&
587 request->url().host() == kChromeUIDinoHost) {
588 return new net::URLRequestErrorJob(request, network_delegate,
589 net::Error::ERR_INTERNET_DISCONNECTED);
590 }
591
585 // Fall back to using a custom handler 592 // Fall back to using a custom handler
586 return new URLRequestChromeJob( 593 return new URLRequestChromeJob(
587 request, network_delegate, 594 request, network_delegate,
588 GetURLDataManagerForResourceContext(resource_context_), is_incognito_); 595 GetURLDataManagerForResourceContext(resource_context_), is_incognito_);
589 } 596 }
590 597
591 bool IsSafeRedirectTarget(const GURL& location) const override { 598 bool IsSafeRedirectTarget(const GURL& location) const override {
592 return false; 599 return false;
593 } 600 }
594 601
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 856
850 } // namespace 857 } // namespace
851 858
852 net::URLRequestJobFactory::ProtocolHandler* CreateDevToolsProtocolHandler( 859 net::URLRequestJobFactory::ProtocolHandler* CreateDevToolsProtocolHandler(
853 ResourceContext* resource_context, 860 ResourceContext* resource_context,
854 bool is_incognito) { 861 bool is_incognito) {
855 return new DevToolsJobFactory(resource_context, is_incognito); 862 return new DevToolsJobFactory(resource_context, is_incognito);
856 } 863 }
857 864
858 } // namespace content 865 } // namespace content
OLDNEW
« no previous file with comments | « chrome/common/url_constants.cc ('k') | content/public/common/url_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698