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

Unified Diff: content/browser/appcache/appcache_service_impl.cc

Issue 2501343003: PlzNavigate: AppCache support. (Closed)
Patch Set: Add DCHECKs for PlzNavigate and fix a double Release problem which caused one unit_test to fail wit… Created 4 years, 1 month 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: content/browser/appcache/appcache_service_impl.cc
diff --git a/content/browser/appcache/appcache_service_impl.cc b/content/browser/appcache/appcache_service_impl.cc
index 2978f4993077ccc99260e720f3c1b8c38749d117..2222e86b8477c2cac2692cad7fdbeaa800535551 100644
--- a/content/browser/appcache/appcache_service_impl.cc
+++ b/content/browser/appcache/appcache_service_impl.cc
@@ -25,6 +25,7 @@
#include "content/browser/appcache/appcache_response.h"
#include "content/browser/appcache/appcache_service_impl.h"
#include "content/browser/appcache/appcache_storage_impl.h"
+#include "content/public/common/browser_side_navigation_policy.h"
#include "net/base/completion_callback.h"
#include "net/base/io_buffer.h"
#include "storage/browser/quota/special_storage_policy.h"
@@ -527,4 +528,20 @@ void AppCacheServiceImpl::UnregisterBackend(
backends_.erase(backend_impl->process_id());
}
+void AppCacheServiceImpl::RegisterBackendForFrame(
+ AppCacheBackendImpl* backend_impl) {
+ DCHECK(IsBrowserSideNavigationEnabled());
+ DCHECK(backends_for_frame_.find(backend_impl->frame_id()) ==
+ backends_for_frame_.end());
+
+ backends_for_frame_.insert(
+ BackendMap::value_type(backend_impl->frame_id(), backend_impl));
+}
+
+void AppCacheServiceImpl::UnregisterBackendForFrame(
+ AppCacheBackendImpl* backend_impl) {
+ DCHECK(IsBrowserSideNavigationEnabled());
+ backends_for_frame_.erase(backend_impl->frame_id());
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698