| 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..526d72f1ea15d289547b4c5fb1e10fb8d1de534e 100644
|
| --- a/content/browser/appcache/appcache_host.cc
|
| +++ b/content/browser/appcache/appcache_host.cc
|
| @@ -58,7 +58,8 @@ AppCacheHost::AppCacheHost(int host_id, AppCacheFrontend* frontend,
|
| 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 +544,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);
|
|
|