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

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

Issue 9808029: Prepending view-source: does not load the source of the userscript. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: TabContents is now WebContentsImpl Created 8 years, 8 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
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 // 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_impl.h" 7 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h"
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 child_id, 882 child_id,
883 route_id, 883 route_id,
884 is_continuation_of_transferred_request, 884 is_continuation_of_transferred_request,
885 &throttles); 885 &throttles);
886 if (!throttles.empty()) { 886 if (!throttles.empty()) {
887 handler = new ThrottlingResourceHandler(this, handler, child_id, 887 handler = new ThrottlingResourceHandler(this, handler, child_id,
888 request_id, throttles.Pass()); 888 request_id, throttles.Pass());
889 } 889 }
890 } 890 }
891 891
892 bool allow_download = request_data.allow_download &&
893 ResourceType::IsFrame(request_data.resource_type);
892 // Make extra info and read footer (contains request ID). 894 // Make extra info and read footer (contains request ID).
893 ResourceRequestInfoImpl* extra_info = 895 ResourceRequestInfoImpl* extra_info =
894 new ResourceRequestInfoImpl( 896 new ResourceRequestInfoImpl(
895 handler, 897 handler,
896 process_type, 898 process_type,
897 child_id, 899 child_id,
898 route_id, 900 route_id,
899 request_data.origin_pid, 901 request_data.origin_pid,
900 request_id, 902 request_id,
901 request_data.is_main_frame, 903 request_data.is_main_frame,
902 request_data.frame_id, 904 request_data.frame_id,
903 request_data.parent_is_main_frame, 905 request_data.parent_is_main_frame,
904 request_data.parent_frame_id, 906 request_data.parent_frame_id,
905 request_data.resource_type, 907 request_data.resource_type,
906 request_data.transition_type, 908 request_data.transition_type,
907 upload_size, 909 upload_size,
908 false, // is download 910 false, // is download
909 ResourceType::IsFrame(request_data.resource_type), // allow_download 911 allow_download,
910 request_data.has_user_gesture, 912 request_data.has_user_gesture,
911 request_data.referrer_policy, 913 request_data.referrer_policy,
912 resource_context); 914 resource_context);
913 extra_info->AssociateWithRequest(request); // Request takes ownership. 915 extra_info->AssociateWithRequest(request); // Request takes ownership.
914 916
915 if (request->url().SchemeIs(chrome::kBlobScheme)) { 917 if (request->url().SchemeIs(chrome::kBlobScheme)) {
916 // Hang on to a reference to ensure the blob is not released prior 918 // Hang on to a reference to ensure the blob is not released prior
917 // to the job being started. 919 // to the job being started.
918 webkit_blob::BlobStorageController* controller = 920 webkit_blob::BlobStorageController* controller =
919 GetBlobStorageControllerForResourceContext(resource_context); 921 GetBlobStorageControllerForResourceContext(resource_context);
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
2308 return allow_cross_origin_auth_prompt_; 2310 return allow_cross_origin_auth_prompt_;
2309 } 2311 }
2310 2312
2311 bool ResourceDispatcherHostImpl::IsTransferredNavigation( 2313 bool ResourceDispatcherHostImpl::IsTransferredNavigation(
2312 const GlobalRequestID& transferred_request_id) const { 2314 const GlobalRequestID& transferred_request_id) const {
2313 return transferred_navigations_.find(transferred_request_id) != 2315 return transferred_navigations_.find(transferred_request_id) !=
2314 transferred_navigations_.end(); 2316 transferred_navigations_.end();
2315 } 2317 }
2316 2318
2317 } // namespace content 2319 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_impl.cc » ('j') | content/browser/web_contents/web_contents_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698