| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/appcache/appcache_request_handler.h" | 5 #include "content/browser/appcache/appcache_request_handler.h" |
| 6 | 6 |
| 7 #include <utility> |
| 8 |
| 7 #include "base/bind.h" | 9 #include "base/bind.h" |
| 8 #include "content/browser/appcache/appcache.h" | 10 #include "content/browser/appcache/appcache.h" |
| 9 #include "content/browser/appcache/appcache_backend_impl.h" | 11 #include "content/browser/appcache/appcache_backend_impl.h" |
| 10 #include "content/browser/appcache/appcache_policy.h" | 12 #include "content/browser/appcache/appcache_policy.h" |
| 11 #include "content/browser/appcache/appcache_url_request_job.h" | 13 #include "content/browser/appcache/appcache_url_request_job.h" |
| 12 #include "content/browser/service_worker/service_worker_request_handler.h" | 14 #include "content/browser/service_worker/service_worker_request_handler.h" |
| 13 #include "net/url_request/url_request.h" | 15 #include "net/url_request/url_request.h" |
| 14 #include "net/url_request/url_request_job.h" | 16 #include "net/url_request/url_request_job.h" |
| 15 | 17 |
| 16 namespace content { | 18 namespace content { |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 host_for_cross_site_transfer_ = backend->TransferHostOut(host_->host_id()); | 192 host_for_cross_site_transfer_ = backend->TransferHostOut(host_->host_id()); |
| 191 DCHECK_EQ(host_, host_for_cross_site_transfer_.get()); | 193 DCHECK_EQ(host_, host_for_cross_site_transfer_.get()); |
| 192 } | 194 } |
| 193 | 195 |
| 194 void AppCacheRequestHandler::CompleteCrossSiteTransfer( | 196 void AppCacheRequestHandler::CompleteCrossSiteTransfer( |
| 195 int new_process_id, int new_host_id) { | 197 int new_process_id, int new_host_id) { |
| 196 if (!host_for_cross_site_transfer_.get()) | 198 if (!host_for_cross_site_transfer_.get()) |
| 197 return; | 199 return; |
| 198 DCHECK_EQ(host_, host_for_cross_site_transfer_.get()); | 200 DCHECK_EQ(host_, host_for_cross_site_transfer_.get()); |
| 199 AppCacheBackendImpl* backend = host_->service()->GetBackend(new_process_id); | 201 AppCacheBackendImpl* backend = host_->service()->GetBackend(new_process_id); |
| 200 backend->TransferHostIn(new_host_id, host_for_cross_site_transfer_.Pass()); | 202 backend->TransferHostIn(new_host_id, |
| 203 std::move(host_for_cross_site_transfer_)); |
| 201 } | 204 } |
| 202 | 205 |
| 203 void AppCacheRequestHandler::MaybeCompleteCrossSiteTransferInOldProcess( | 206 void AppCacheRequestHandler::MaybeCompleteCrossSiteTransferInOldProcess( |
| 204 int old_process_id) { | 207 int old_process_id) { |
| 205 if (!host_ || !host_for_cross_site_transfer_.get() || | 208 if (!host_ || !host_for_cross_site_transfer_.get() || |
| 206 old_process_id != old_process_id_) { | 209 old_process_id != old_process_id_) { |
| 207 return; | 210 return; |
| 208 } | 211 } |
| 209 CompleteCrossSiteTransfer(old_process_id_, old_host_id_); | 212 CompleteCrossSiteTransfer(old_process_id_, old_host_id_); |
| 210 } | 213 } |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 if (!host_->associated_cache() || | 480 if (!host_->associated_cache() || |
| 478 !host_->associated_cache()->is_complete()) { | 481 !host_->associated_cache()->is_complete()) { |
| 479 DeliverNetworkResponse(); | 482 DeliverNetworkResponse(); |
| 480 return; | 483 return; |
| 481 } | 484 } |
| 482 | 485 |
| 483 ContinueMaybeLoadSubResource(); | 486 ContinueMaybeLoadSubResource(); |
| 484 } | 487 } |
| 485 | 488 |
| 486 } // namespace content | 489 } // namespace content |
| OLD | NEW |