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

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: Created 8 years, 4 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 0f123a134bb52fe16ad9d8da5966f7b9e4a89d9d..66a13a41e5ee8ee003e6d6161e8f010a6ad7cea2 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) {
+ request_response_found_(false), cache_entry_not_found_(false) {
DCHECK(host_);
host_->AddObserver(this);
}
@@ -71,6 +71,7 @@ AppCacheURLRequestJob* AppCacheRequestHandler::MaybeLoadResource(
found_cache_id_ = kNoCacheId;
found_manifest_url_ = GURL();
found_network_namespace_ = false;
+ request_response_found_ = false;
if (is_main_resource())
MaybeLoadMainResource(request);
@@ -99,6 +100,12 @@ AppCacheURLRequestJob* AppCacheRequestHandler::MaybeLoadFallbackForRedirect(
DCHECK(!job_); // our jobs never generate redirects
michaeln 2012/08/17 00:50:43 I think there's an additional condition that has t
vabr (Chromium) 2012/08/17 16:22:35 This should now be addressed by the call to MaybeL
+ if (!request_response_found_) {
+ storage()->FindResponseForSubRequest(
+ host_->associated_cache(), request->url(),
+ &found_entry_, &found_fallback_entry_, &found_network_namespace_);
michaeln 2012/08/17 00:50:43 What should we do if found_entry_.has_response_id(
vabr (Chromium) 2012/08/17 16:22:35 Here I realised that I should use original_url(),
+ request_response_found_ = true;
+ }
if (found_fallback_entry_.has_response_id()) {
michaeln 2012/08/17 00:50:43 As coded we'll will load an appcached fallback res
vabr (Chromium) 2012/08/17 16:22:35 Through the use of MaybeLoadResource within MaybeL
// 6.9.6, step 4: If this results in a redirect to another origin,
// get the resource of the fallback entry.
@@ -310,6 +317,7 @@ void AppCacheRequestHandler::ContinueMaybeLoadSubResource() {
storage()->FindResponseForSubRequest(
host_->associated_cache(), url,
&found_entry_, &found_fallback_entry_, &found_network_namespace_);
+ request_response_found_ = true;
if (found_entry_.has_response_id()) {
// Step 2: If there's an entry, get it instead.
« 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