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

Unified Diff: webkit/browser/appcache/appcache_request_handler.cc

Issue 137883005: crossSite navs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/browser/appcache/appcache_request_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/browser/appcache/appcache_request_handler.cc
diff --git a/webkit/browser/appcache/appcache_request_handler.cc b/webkit/browser/appcache/appcache_request_handler.cc
index 957cf207b1f3f3c90351ba08d9e199824b13fc8e..102c1843e6051ad5b5f0c92c0ce59e808993924b 100644
--- a/webkit/browser/appcache/appcache_request_handler.cc
+++ b/webkit/browser/appcache/appcache_request_handler.cc
@@ -7,6 +7,7 @@
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_job.h"
#include "webkit/browser/appcache/appcache.h"
+#include "webkit/browser/appcache/appcache_backend_impl.h"
#include "webkit/browser/appcache/appcache_policy.h"
#include "webkit/browser/appcache/appcache_url_request_job.h"
@@ -34,14 +35,6 @@ AppCacheStorage* AppCacheRequestHandler::storage() const {
return host_->storage();
}
-void AppCacheRequestHandler::GetExtraResponseInfo(
- int64* cache_id, GURL* manifest_url) {
- if (job_.get() && job_->is_delivering_appcache_response()) {
- *cache_id = job_->cache_id();
- *manifest_url = job_->manifest_url();
- }
-}
-
AppCacheURLRequestJob* AppCacheRequestHandler::MaybeLoadResource(
net::URLRequest* request, net::NetworkDelegate* network_delegate) {
maybe_load_resource_executed_ = true;
@@ -170,6 +163,31 @@ AppCacheURLRequestJob* AppCacheRequestHandler::MaybeLoadFallbackForResponse(
return job_.get();
}
+void AppCacheRequestHandler::GetExtraResponseInfo(
+ int64* cache_id, GURL* manifest_url) {
+ if (job_.get() && job_->is_delivering_appcache_response()) {
+ *cache_id = job_->cache_id();
+ *manifest_url = job_->manifest_url();
+ }
+}
+
+void AppCacheRequestHandler::PrepareForCrossSiteTransfer(int old_process_id) {
+ if (!host_)
+ return;
+ AppCacheBackendImpl* backend = host_->service()->GetBackend(old_process_id);
+ host_for_cross_site_transfer_ = backend->TransferHostOut(host_->host_id());
+ DCHECK_EQ(host_, host_for_cross_site_transfer_.get());
+}
+
+void AppCacheRequestHandler::CompleteCrossSiteTransfer(
+ int new_process_id, int new_host_id) {
+ if (!host_for_cross_site_transfer_.get())
+ return;
+ DCHECK_EQ(host_, host_for_cross_site_transfer_.get());
+ AppCacheBackendImpl* backend = host_->service()->GetBackend(new_process_id);
+ backend->TransferHostIn(new_host_id, host_for_cross_site_transfer_.Pass());
+}
+
void AppCacheRequestHandler::OnDestructionImminent(AppCacheHost* host) {
storage()->CancelDelegateCallbacks(this);
host_ = NULL; // no need to RemoveObserver, the host is being deleted
« no previous file with comments | « webkit/browser/appcache/appcache_request_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698