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

Unified Diff: webkit/appcache/mock_appcache_storage.cc

Issue 3529009: Fix http/tests/appcache/foreign-fallback.html (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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/mock_appcache_storage.cc
===================================================================
--- webkit/appcache/mock_appcache_storage.cc (revision 64524)
+++ webkit/appcache/mock_appcache_storage.cc (working copy)
@@ -212,6 +212,7 @@
namespace {
struct FoundCandidate {
+ GURL url;
AppCacheEntry entry;
int64 cache_id;
GURL manifest_url;
@@ -228,7 +229,8 @@
simulate_find_main_resource_ = false;
if (delegate_ref->delegate) {
delegate_ref->delegate->OnMainResponseFound(
- url, simulated_found_entry_, simulated_found_fallback_entry_,
+ url, simulated_found_entry_,
+ simulated_found_fallback_url_, simulated_found_fallback_entry_,
simulated_found_cache_id_, simulated_found_manifest_url_, false);
}
return;
@@ -283,6 +285,7 @@
bool is_in_use = IsCacheStored(cache) && !cache->HasOneRef();
if (found_entry.has_response_id()) {
+ found_candidate.url = url;
found_candidate.entry = found_entry;
found_candidate.cache_id = cache->cache_id();
found_candidate.manifest_url = group->manifest_url();
@@ -313,6 +316,8 @@
}
if (take_new_candidate) {
+ found_fallback_candidate.url =
+ cache->GetFallbackEntryUrl(found_fallback_namespace);
found_fallback_candidate.entry = found_fallback_entry;
found_fallback_candidate.cache_id = cache->cache_id();
found_fallback_candidate.manifest_url = group->manifest_url();
@@ -325,7 +330,7 @@
// Found a direct hit.
if (found_candidate.entry.has_response_id()) {
delegate_ref->delegate->OnMainResponseFound(
- url, found_candidate.entry, AppCacheEntry(),
+ url, found_candidate.entry, GURL(), AppCacheEntry(),
found_candidate.cache_id, found_candidate.manifest_url, false);
return;
}
@@ -333,7 +338,9 @@
// Found a fallback namespace.
if (found_fallback_candidate.entry.has_response_id()) {
delegate_ref->delegate->OnMainResponseFound(
- url, AppCacheEntry(), found_fallback_candidate.entry,
+ url, AppCacheEntry(),
+ found_fallback_candidate.url,
+ found_fallback_candidate.entry,
found_fallback_candidate.cache_id,
found_fallback_candidate.manifest_url, false);
return;
@@ -341,7 +348,7 @@
// Didn't find anything.
delegate_ref->delegate->OnMainResponseFound(
- url, AppCacheEntry(), AppCacheEntry(), kNoCacheId, GURL(), false);
+ url, AppCacheEntry(), GURL(), AppCacheEntry(), kNoCacheId, GURL(), false);
}
void MockAppCacheStorage::ProcessMakeGroupObsolete(

Powered by Google App Engine
This is Rietveld 408576698