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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 // is starting, so that it can tell its old renderer to run its onunload | 360 // is starting, so that it can tell its old renderer to run its onunload |
361 // handler now. We will wait until the unload is finished and (if a transfer | 361 // handler now. We will wait until the unload is finished and (if a transfer |
362 // is needed) for the new renderer's request to arrive. | 362 // is needed) for the new renderer's request to arrive. |
363 // The |transfer_url_chain| contains any redirect URLs that have already | 363 // The |transfer_url_chain| contains any redirect URLs that have already |
364 // occurred, plus the destination URL at the end. | 364 // occurred, plus the destination URL at the end. |
365 std::vector<GURL> transfer_url_chain; | 365 std::vector<GURL> transfer_url_chain; |
366 Referrer referrer; | 366 Referrer referrer; |
367 int render_frame_id = info->GetRenderFrameID(); | 367 int render_frame_id = info->GetRenderFrameID(); |
368 transfer_url_chain = request()->url_chain(); | 368 transfer_url_chain = request()->url_chain(); |
369 referrer = Referrer(GURL(request()->referrer()), info->GetReferrerPolicy()); | 369 referrer = Referrer(GURL(request()->referrer()), info->GetReferrerPolicy()); |
370 | |
371 AppCacheInterceptor::PrepareForCrossSiteTransfer( | |
372 request(), global_id.child_id); | |
373 ResourceDispatcherHostImpl::Get()->MarkAsTransferredNavigation(global_id); | 370 ResourceDispatcherHostImpl::Get()->MarkAsTransferredNavigation(global_id); |
374 | 371 |
375 BrowserThread::PostTask( | 372 BrowserThread::PostTask( |
376 BrowserThread::UI, | 373 BrowserThread::UI, |
377 FROM_HERE, | 374 FROM_HERE, |
378 base::Bind( | 375 base::Bind( |
379 &OnCrossSiteResponseHelper, | 376 &OnCrossSiteResponseHelper, |
380 CrossSiteResponseParams(render_frame_id, | 377 CrossSiteResponseParams(render_frame_id, |
381 global_id, | 378 global_id, |
382 transfer_url_chain, | 379 transfer_url_chain, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 controller()->Resume(); | 421 controller()->Resume(); |
425 } | 422 } |
426 } | 423 } |
427 | 424 |
428 void CrossSiteResourceHandler::OnDidDefer() { | 425 void CrossSiteResourceHandler::OnDidDefer() { |
429 did_defer_ = true; | 426 did_defer_ = true; |
430 request()->LogBlockedBy("CrossSiteResourceHandler"); | 427 request()->LogBlockedBy("CrossSiteResourceHandler"); |
431 } | 428 } |
432 | 429 |
433 } // namespace content | 430 } // namespace content |
OLD | NEW |