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( |