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

Side by Side Diff: content/browser/loader/resource_request_info_impl.cc

Issue 12212031: Add support for redirecting ResourceHandlers to a blob: URL (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 7 years, 10 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 #include "content/browser/loader/resource_request_info_impl.h" 5 #include "content/browser/loader/resource_request_info_impl.h"
6 6
7 #include "content/browser/worker_host/worker_service_impl.h" 7 #include "content/browser/worker_host/worker_service_impl.h"
8 #include "content/common/net/url_request_user_data.h" 8 #include "content/common/net/url_request_user_data.h"
9 #include "content/public/browser/global_request_id.h" 9 #include "content/public/browser/global_request_id.h"
10 #include "net/url_request/url_request.h" 10 #include "net/url_request/url_request.h"
(...skipping 24 matching lines...) Expand all
35 render_view_id, // route_id 35 render_view_id, // route_id
36 0, // origin_pid 36 0, // origin_pid
37 0, // request_id 37 0, // request_id
38 resource_type == ResourceType::MAIN_FRAME, // is_main_frame 38 resource_type == ResourceType::MAIN_FRAME, // is_main_frame
39 0, // frame_id 39 0, // frame_id
40 false, // parent_is_main_frame 40 false, // parent_is_main_frame
41 0, // parent_frame_id 41 0, // parent_frame_id
42 resource_type, // resource_type 42 resource_type, // resource_type
43 PAGE_TRANSITION_LINK, // transition_type 43 PAGE_TRANSITION_LINK, // transition_type
44 false, // is_download 44 false, // is_download
45 false, // is_stream
45 true, // allow_download 46 true, // allow_download
46 false, // has_user_gesture 47 false, // has_user_gesture
47 WebKit::WebReferrerPolicyDefault, // referrer_policy 48 WebKit::WebReferrerPolicyDefault, // referrer_policy
48 context); // context 49 context); // context
49 info->AssociateWithRequest(request); 50 info->AssociateWithRequest(request);
50 } 51 }
51 52
52 // static 53 // static
53 bool ResourceRequestInfo::GetRenderViewForRequest( 54 bool ResourceRequestInfo::GetRenderViewForRequest(
54 const net::URLRequest* request, 55 const net::URLRequest* request,
(...skipping 29 matching lines...) Expand all
84 int route_id, 85 int route_id,
85 int origin_pid, 86 int origin_pid,
86 int request_id, 87 int request_id,
87 bool is_main_frame, 88 bool is_main_frame,
88 int64 frame_id, 89 int64 frame_id,
89 bool parent_is_main_frame, 90 bool parent_is_main_frame,
90 int64 parent_frame_id, 91 int64 parent_frame_id,
91 ResourceType::Type resource_type, 92 ResourceType::Type resource_type,
92 PageTransition transition_type, 93 PageTransition transition_type,
93 bool is_download, 94 bool is_download,
95 bool is_stream,
94 bool allow_download, 96 bool allow_download,
95 bool has_user_gesture, 97 bool has_user_gesture,
96 WebKit::WebReferrerPolicy referrer_policy, 98 WebKit::WebReferrerPolicy referrer_policy,
97 ResourceContext* context) 99 ResourceContext* context)
98 : cross_site_handler_(NULL), 100 : cross_site_handler_(NULL),
99 async_handler_(NULL), 101 async_handler_(NULL),
100 process_type_(process_type), 102 process_type_(process_type),
101 child_id_(child_id), 103 child_id_(child_id),
102 route_id_(route_id), 104 route_id_(route_id),
103 origin_pid_(origin_pid), 105 origin_pid_(origin_pid),
104 request_id_(request_id), 106 request_id_(request_id),
105 is_main_frame_(is_main_frame), 107 is_main_frame_(is_main_frame),
106 frame_id_(frame_id), 108 frame_id_(frame_id),
107 parent_is_main_frame_(parent_is_main_frame), 109 parent_is_main_frame_(parent_is_main_frame),
108 parent_frame_id_(parent_frame_id), 110 parent_frame_id_(parent_frame_id),
109 is_download_(is_download), 111 is_download_(is_download),
112 is_stream_(is_stream),
110 allow_download_(allow_download), 113 allow_download_(allow_download),
111 has_user_gesture_(has_user_gesture), 114 has_user_gesture_(has_user_gesture),
112 was_ignored_by_handler_(false), 115 was_ignored_by_handler_(false),
113 resource_type_(resource_type), 116 resource_type_(resource_type),
114 transition_type_(transition_type), 117 transition_type_(transition_type),
115 memory_cost_(0), 118 memory_cost_(0),
116 referrer_policy_(referrer_policy), 119 referrer_policy_(referrer_policy),
117 context_(context) { 120 context_(context) {
118 } 121 }
119 122
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 GlobalRequestID ResourceRequestInfoImpl::GetGlobalRequestID() const { 218 GlobalRequestID ResourceRequestInfoImpl::GetGlobalRequestID() const {
216 return GlobalRequestID(child_id_, request_id_); 219 return GlobalRequestID(child_id_, request_id_);
217 } 220 }
218 221
219 void ResourceRequestInfoImpl::set_requested_blob_data( 222 void ResourceRequestInfoImpl::set_requested_blob_data(
220 webkit_blob::BlobData* data) { 223 webkit_blob::BlobData* data) {
221 requested_blob_data_ = data; 224 requested_blob_data_ = data;
222 } 225 }
223 226
224 } // namespace content 227 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698