| OLD | NEW |
| 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/cross_site_resource_handler.h" | 5 #include "content/browser/loader/cross_site_resource_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 response_ = response; | 143 response_ = response; |
| 144 has_started_response_ = true; | 144 has_started_response_ = true; |
| 145 | 145 |
| 146 // Store this handler on the ExtraRequestInfo, so that RDH can call our | 146 // Store this handler on the ExtraRequestInfo, so that RDH can call our |
| 147 // ResumeResponse method when we are ready to resume. | 147 // ResumeResponse method when we are ready to resume. |
| 148 ResourceRequestInfoImpl* info = GetRequestInfo(); | 148 ResourceRequestInfoImpl* info = GetRequestInfo(); |
| 149 info->set_cross_site_handler(this); | 149 info->set_cross_site_handler(this); |
| 150 | 150 |
| 151 TransitionLayerData transition_data; | 151 TransitionLayerData transition_data; |
| 152 bool is_navigation_transition = | 152 bool is_navigation_transition = |
| 153 TransitionRequestManager::GetInstance()->GetPendingTransitionRequest( | 153 TransitionRequestManager::GetInstance()->HasPendingTransitionRequest( |
| 154 info->GetChildID(), info->GetRenderFrameID(), request()->url(), | 154 info->GetChildID(), info->GetRenderFrameID(), request()->url(), |
| 155 &transition_data); | 155 &transition_data); |
| 156 | 156 |
| 157 if (is_navigation_transition) { | 157 if (is_navigation_transition) { |
| 158 if (response_.get()) | 158 if (response_.get()) |
| 159 transition_data.response_headers = response_->head.headers; | 159 transition_data.response_headers = response_->head.headers; |
| 160 transition_data.request_url = request()->url(); | 160 transition_data.request_url = request()->url(); |
| 161 | 161 |
| 162 return OnNavigationTransitionResponseStarted(response, defer, | 162 return OnNavigationTransitionResponseStarted(response, defer, |
| 163 transition_data); | 163 transition_data); |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 controller()->Resume(); | 424 controller()->Resume(); |
| 425 } | 425 } |
| 426 } | 426 } |
| 427 | 427 |
| 428 void CrossSiteResourceHandler::OnDidDefer() { | 428 void CrossSiteResourceHandler::OnDidDefer() { |
| 429 did_defer_ = true; | 429 did_defer_ = true; |
| 430 request()->LogBlockedBy("CrossSiteResourceHandler"); | 430 request()->LogBlockedBy("CrossSiteResourceHandler"); |
| 431 } | 431 } |
| 432 | 432 |
| 433 } // namespace content | 433 } // namespace content |
| OLD | NEW |