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

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

Issue 2501343003: PlzNavigate: AppCache support. (Closed)
Patch Set: Address review comments Created 4 years 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_backend_impl.cc
diff --git a/content/browser/appcache/appcache_backend_impl.cc b/content/browser/appcache/appcache_backend_impl.cc
index 7f29c3e97a713cb7a13924b6cc27a7fb9113627a..c07951504d1c8d7d0773a24e20f28ad11374846c 100644
--- a/content/browser/appcache/appcache_backend_impl.cc
+++ b/content/browser/appcache/appcache_backend_impl.cc
@@ -8,6 +8,8 @@
#include "content/browser/appcache/appcache.h"
#include "content/browser/appcache/appcache_group.h"
#include "content/browser/appcache/appcache_service_impl.h"
+#include "content/public/browser/browser_thread.h"
+#include "content/public/common/browser_side_navigation_policy.h"
namespace content {
@@ -166,4 +168,17 @@ void AppCacheBackendImpl::TransferHostIn(int new_host_id,
found->second = std::move(host);
}
+void AppCacheBackendImpl::RegisterPrecreatedHost(
+ std::unique_ptr<AppCacheHost> host) {
+ DCHECK(IsBrowserSideNavigationEnabled());
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+
+ DCHECK(host.get());
+ DCHECK(hosts_.find(host->host_id()) == hosts_.end());
+ // Switch the frontend proxy so that the host can make IPC calls from
+ // here on.
+ host->set_frontend(frontend_);
+ hosts_[host->host_id()] = std::move(host);
+}
+
} // namespace content
« no previous file with comments | « content/browser/appcache/appcache_backend_impl.h ('k') | content/browser/appcache/appcache_dispatcher_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698