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

Unified Diff: webkit/appcache/web_application_cache_host_impl.cc

Issue 6667057: Loading from the "most appropiate" appcache. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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
Index: webkit/appcache/web_application_cache_host_impl.cc
===================================================================
--- webkit/appcache/web_application_cache_host_impl.cc (revision 78411)
+++ webkit/appcache/web_application_cache_host_impl.cc (working copy)
@@ -156,7 +156,7 @@
}
void WebApplicationCacheHostImpl::willStartMainResourceRequest(
- WebURLRequest& request) {
+ WebURLRequest& request, const WebFrame* frame) {
request.setAppCacheHostID(host_id_);
original_main_resource_url_ = ClearUrlRef(request.url());
@@ -164,6 +164,13 @@
std::string method = request.httpMethod().utf8();
is_get_method_ = (method == kHttpGETMethod);
DCHECK(method == StringToUpperASCII(method));
+
+ if (frame) {
+ if (WebApplicationCacheHostImpl* parent = FromFrame(frame->parent()))
+ backend_->SetSpawningHostId(host_id_, parent->host_id());
+ else if (WebApplicationCacheHostImpl* opener = FromFrame(frame->opener()))
+ backend_->SetSpawningHostId(host_id_, opener->host_id());
+ }
}
void WebApplicationCacheHostImpl::willStartSubResourceRequest(
« no previous file with comments | « webkit/appcache/web_application_cache_host_impl.h ('k') | webkit/tools/test_shell/simple_appcache_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698