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

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

Issue 287002: Fix crash bug when attempting to download a url with unsupported scheme, e.g.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/renderer_host/resource_dispatcher_host.h" 7 #include "chrome/browser/renderer_host/resource_dispatcher_host.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 handler = new SafeBrowsingResourceHandler(handler, 722 handler = new SafeBrowsingResourceHandler(handler,
723 child_id, 723 child_id,
724 route_id, 724 route_id,
725 url, 725 url,
726 ResourceType::MAIN_FRAME, 726 ResourceType::MAIN_FRAME,
727 safe_browsing_, 727 safe_browsing_,
728 this, 728 this,
729 receiver_); 729 receiver_);
730 } 730 }
731 731
732 bool known_proto = URLRequest::IsHandledURL(url); 732 if (!URLRequest::IsHandledURL(url)) {
733 if (!known_proto) { 733 LOG(INFO) << "Download request for unsupported protocol: " <<
734 CHECK(false); 734 url.possibly_invalid_spec();
735 return;
735 } 736 }
736 737
737 request->set_method("GET"); 738 request->set_method("GET");
738 request->set_referrer(referrer.spec()); 739 request->set_referrer(referrer.spec());
739 request->set_context(request_context); 740 request->set_context(request_context);
740 request->set_load_flags(request->load_flags() | 741 request->set_load_flags(request->load_flags() |
741 net::LOAD_IS_DOWNLOAD); 742 net::LOAD_IS_DOWNLOAD);
742 743
743 ResourceDispatcherHostRequestInfo* extra_info = 744 ResourceDispatcherHostRequestInfo* extra_info =
744 new ResourceDispatcherHostRequestInfo(handler, 745 new ResourceDispatcherHostRequestInfo(handler,
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1775 case ViewHostMsg_UploadProgress_ACK::ID: 1776 case ViewHostMsg_UploadProgress_ACK::ID:
1776 case ViewHostMsg_SyncLoad::ID: 1777 case ViewHostMsg_SyncLoad::ID:
1777 return true; 1778 return true;
1778 1779
1779 default: 1780 default:
1780 break; 1781 break;
1781 } 1782 }
1782 1783
1783 return false; 1784 return false;
1784 } 1785 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698