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

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

Issue 2956373002: Add support for subresource request loads in AppCache for the network service. (Closed)
Patch Set: Address review comments Created 3 years, 5 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
« no previous file with comments | « content/browser/appcache/appcache_host.h ('k') | content/browser/appcache/appcache_request_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/appcache/appcache_host.cc
diff --git a/content/browser/appcache/appcache_host.cc b/content/browser/appcache/appcache_host.cc
index 3af81c5eef57a9a55e8d38147f0ef6ffa3f3d95a..ecfa39ca9a6fb5d2b2744d45c16be091d45a6b59 100644
--- a/content/browser/appcache/appcache_host.cc
+++ b/content/browser/appcache/appcache_host.cc
@@ -44,21 +44,26 @@ void FillCacheInfo(const AppCache* cache,
} // Anonymous namespace
-AppCacheHost::AppCacheHost(int host_id, AppCacheFrontend* frontend,
+AppCacheHost::AppCacheHost(int host_id,
+ AppCacheFrontend* frontend,
AppCacheServiceImpl* service)
: host_id_(host_id),
- spawning_host_id_(kAppCacheNoHostId), spawning_process_id_(0),
- parent_host_id_(kAppCacheNoHostId), parent_process_id_(0),
+ spawning_host_id_(kAppCacheNoHostId),
+ spawning_process_id_(0),
+ parent_host_id_(kAppCacheNoHostId),
+ parent_process_id_(0),
pending_main_resource_cache_id_(kAppCacheNoCacheId),
pending_selected_cache_id_(kAppCacheNoCacheId),
was_select_cache_called_(false),
is_cache_selection_enabled_(true),
- frontend_(frontend), service_(service),
+ frontend_(frontend),
+ service_(service),
storage_(service->storage()),
pending_callback_param_(NULL),
main_resource_was_namespace_entry_(false),
main_resource_blocked_(false),
- associated_cache_info_pending_(false) {
+ associated_cache_info_pending_(false),
+ weak_factory_(this) {
service_->AddObserver(this);
}
@@ -543,6 +548,10 @@ void AppCacheHost::CompleteTransfer(int host_id, AppCacheFrontend* frontend) {
frontend_ = frontend;
}
+base::WeakPtr<AppCacheHost> AppCacheHost::GetWeakPtr() {
+ return weak_factory_.GetWeakPtr();
+}
+
void AppCacheHost::AssociateNoCache(const GURL& manifest_url) {
// manifest url can be empty.
AssociateCacheHelper(NULL, manifest_url);
« no previous file with comments | « content/browser/appcache/appcache_host.h ('k') | content/browser/appcache/appcache_request_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698