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

Unified Diff: webkit/appcache/appcache.cc

Issue 8949001: Fix some loose ends around recently introduced AppCache INTERCEPT namespaces (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 12 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/appcache.cc
===================================================================
--- webkit/appcache/appcache.cc (revision 116156)
+++ webkit/appcache/appcache.cc (working copy)
@@ -79,11 +79,12 @@
return NULL;
}
-GURL AppCache::GetFallbackEntryUrl(const GURL& namespace_url) const {
- size_t count = fallback_namespaces_.size();
+GURL AppCache::GetNamespaceEntryUrl(const NamespaceVector& namespaces,
+ const GURL& namespace_url) const {
+ size_t count = namespaces.size();
for (size_t i = 0; i < count; ++i) {
- if (fallback_namespaces_[i].namespace_url == namespace_url)
- return fallback_namespaces_[i].target_url;
+ if (namespaces[i].namespace_url == namespace_url)
+ return namespaces[i].target_url;
}
NOTREACHED();
return GURL();
@@ -219,8 +220,9 @@
}
bool AppCache::FindResponseForRequest(const GURL& url,
- AppCacheEntry* found_entry, AppCacheEntry* found_fallback_entry,
- GURL* found_fallback_namespace, bool* found_network_namespace) {
+ AppCacheEntry* found_entry, GURL* found_intercept_namespace,
+ AppCacheEntry* found_fallback_entry, GURL* found_fallback_namespace,
+ bool* found_network_namespace) {
// Ignore fragments when looking up URL in the cache.
GURL url_no_ref;
if (url.has_ref()) {
@@ -249,6 +251,7 @@
entry = GetEntry(intercept_namespace->target_url);
DCHECK(entry);
*found_entry = *entry;
+ *found_intercept_namespace = intercept_namespace->namespace_url;
return true;
}

Powered by Google App Engine
This is Rietveld 408576698