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

Side by Side Diff: content/browser/renderer_host/resource_dispatcher_host.cc

Issue 8117003: Return a specific error code for unknown URL schemes. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/renderer_host/resource_dispatcher_host_unittest.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/browser/renderer_host/resource_dispatcher_host.h" 7 #include "content/browser/renderer_host/resource_dispatcher_host.h"
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 if (!ResourceType::IsFrame(type) || 381 if (!ResourceType::IsFrame(type) ||
382 job_factory.IsHandledURL(url)) { 382 job_factory.IsHandledURL(url)) {
383 return false; 383 return false;
384 } 384 }
385 385
386 if (delegate_) 386 if (delegate_)
387 delegate_->HandleExternalProtocol(url, child_id, route_id); 387 delegate_->HandleExternalProtocol(url, child_id, route_id);
388 388
389 handler->OnResponseCompleted( 389 handler->OnResponseCompleted(
390 request_id, 390 request_id,
391 net::URLRequestStatus(net::URLRequestStatus::FAILED, net::ERR_ABORTED), 391 net::URLRequestStatus(net::URLRequestStatus::FAILED,
392 net::ERR_UNKNOWN_URL_SCHEME),
392 std::string()); // No security info necessary. 393 std::string()); // No security info necessary.
393 return true; 394 return true;
394 } 395 }
395 396
396 bool ResourceDispatcherHost::OnMessageReceived(const IPC::Message& message, 397 bool ResourceDispatcherHost::OnMessageReceived(const IPC::Message& message,
397 ResourceMessageFilter* filter, 398 ResourceMessageFilter* filter,
398 bool* message_was_ok) { 399 bool* message_was_ok) {
399 filter_ = filter; 400 filter_ = filter;
400 bool handled = true; 401 bool handled = true;
401 IPC_BEGIN_MESSAGE_MAP_EX(ResourceDispatcherHost, message, *message_was_ok) 402 IPC_BEGIN_MESSAGE_MAP_EX(ResourceDispatcherHost, message, *message_was_ok)
(...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS; 2150 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS;
2150 } 2151 }
2151 2152
2152 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() { 2153 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() {
2153 return allow_cross_origin_auth_prompt_; 2154 return allow_cross_origin_auth_prompt_;
2154 } 2155 }
2155 2156
2156 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { 2157 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) {
2157 allow_cross_origin_auth_prompt_ = value; 2158 allow_cross_origin_auth_prompt_ = value;
2158 } 2159 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/resource_dispatcher_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698