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

Unified Diff: webkit/appcache/appcache_request_handler.cc

Issue 10829356: Make sure that AppCache tests subresource URLrequests against NETWORK whitelist (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: TODO added Created 8 years, 3 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/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/appcache/appcache_request_handler.cc
diff --git a/webkit/appcache/appcache_request_handler.cc b/webkit/appcache/appcache_request_handler.cc
index 7673273fc4a14aedd5a884a009bd673dc087397a..41513066fb1e43b27fa83c08eb8ac60ecd5a3e5b 100644
--- a/webkit/appcache/appcache_request_handler.cc
+++ b/webkit/appcache/appcache_request_handler.cc
@@ -17,7 +17,7 @@ AppCacheRequestHandler::AppCacheRequestHandler(
: host_(host), resource_type_(resource_type),
is_waiting_for_cache_selection_(false), found_group_id_(0),
found_cache_id_(0), found_network_namespace_(false),
- cache_entry_not_found_(false) {
+ cache_entry_not_found_(false), maybe_load_resource_executed_(false) {
DCHECK(host_);
host_->AddObserver(this);
}
@@ -44,6 +44,7 @@ void AppCacheRequestHandler::GetExtraResponseInfo(
AppCacheURLRequestJob* AppCacheRequestHandler::MaybeLoadResource(
net::URLRequest* request, net::NetworkDelegate* network_delegate) {
+ maybe_load_resource_executed_ = true;
if (!host_ || !IsSchemeAndMethodSupported(request) || cache_entry_not_found_)
return NULL;
@@ -96,6 +97,10 @@ AppCacheURLRequestJob* AppCacheRequestHandler::MaybeLoadFallbackForRedirect(
return NULL;
if (is_main_resource())
return NULL;
+ // TODO(vabr) This is a temporary fix (see crbug/141114). We should get rid of
+ // it once a more general solution to crbug/121325 is in place.
+ if (!maybe_load_resource_executed_)
+ return NULL;
if (request->url().GetOrigin() == location.GetOrigin())
return NULL;
« no previous file with comments | « webkit/appcache/appcache_request_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698