| Index: chrome/browser/renderer_host/resource_dispatcher_host.cc
|
| ===================================================================
|
| --- chrome/browser/renderer_host/resource_dispatcher_host.cc (revision 11701)
|
| +++ chrome/browser/renderer_host/resource_dispatcher_host.cc (working copy)
|
| @@ -323,14 +323,15 @@
|
| process_id,
|
| route_id,
|
| request_id,
|
| - request_data.mixed_content,
|
| + request_data.frame_origin,
|
| + request_data.main_frame_origin,
|
| request_data.resource_type,
|
| upload_size);
|
| extra_info->allow_download =
|
| ResourceType::IsFrame(request_data.resource_type);
|
| request->set_user_data(extra_info); // takes pointer ownership
|
|
|
| - BeginRequestInternal(request, request_data.mixed_content);
|
| + BeginRequestInternal(request);
|
| }
|
|
|
| // We are explicitly forcing the download of 'url'.
|
| @@ -393,14 +394,15 @@
|
| process_id,
|
| route_id,
|
| request_id_,
|
| - false, // Downloads are not considered mixed-content
|
| + "null", // frame_origin
|
| + "null", // main_frame_origin
|
| ResourceType::SUB_RESOURCE,
|
| 0 /* upload_size */ );
|
| extra_info->allow_download = true;
|
| extra_info->is_download = true;
|
| request->set_user_data(extra_info); // Takes pointer ownership.
|
|
|
| - BeginRequestInternal(request, false);
|
| + BeginRequestInternal(request);
|
| }
|
|
|
| // This function is only used for saving feature.
|
| @@ -446,7 +448,8 @@
|
| process_id,
|
| route_id,
|
| request_id_,
|
| - false,
|
| + "null", // frame_origin
|
| + "null", // main_frame_origin
|
| ResourceType::SUB_RESOURCE,
|
| 0 /* upload_size */);
|
| // Just saving some resources we need, disallow downloading.
|
| @@ -454,7 +457,7 @@
|
| extra_info->is_download = false;
|
| request->set_user_data(extra_info); // Takes pointer ownership.
|
|
|
| - BeginRequestInternal(request, false);
|
| + BeginRequestInternal(request);
|
| }
|
|
|
| void ResourceDispatcherHost::CancelRequest(int process_id,
|
| @@ -925,8 +928,7 @@
|
| return kAvgBytesPerOutstandingRequest + strings_cost + upload_cost;
|
| }
|
|
|
| -void ResourceDispatcherHost::BeginRequestInternal(URLRequest* request,
|
| - bool mixed_content) {
|
| +void ResourceDispatcherHost::BeginRequestInternal(URLRequest* request) {
|
| DCHECK(!request->is_pending());
|
| ExtraRequestInfo* info = ExtraInfoForRequest(request);
|
|
|
| @@ -955,17 +957,16 @@
|
| BlockedRequestMap::const_iterator iter = blocked_requests_map_.find(pair_id);
|
| if (iter != blocked_requests_map_.end()) {
|
| // The request should be blocked.
|
| - iter->second->push_back(BlockedRequest(request, mixed_content));
|
| + iter->second->push_back(BlockedRequest(request));
|
| return;
|
| }
|
|
|
| GlobalRequestID global_id(info->process_id, info->request_id);
|
| pending_requests_[global_id] = request;
|
| - if (mixed_content) {
|
| - // We don't start the request in that case. The SSLManager will potentially
|
| - // change the request (potentially to indicate its content should be
|
| - // filtered) and start it itself.
|
| - SSLManager::OnMixedContentRequest(this, request, ui_loop_);
|
| + if (!SSLManager::ShouldStartRequest(this, request, ui_loop_)) {
|
| + // The SSLManager has told us that we shouldn't start the request yet. The
|
| + // SSLManager will potentially change the request (potentially to indicate
|
| + // its content should be filtered) and start it itself.
|
| return;
|
| }
|
| request->Start();
|
| @@ -1453,7 +1454,7 @@
|
| if (cancel_requests)
|
| delete req_iter->url_request;
|
| else
|
| - BeginRequestInternal(req_iter->url_request, req_iter->mixed_content);
|
| + BeginRequestInternal(req_iter->url_request);
|
| }
|
|
|
| delete requests;
|
|
|