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

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

Issue 2902653002: Get main frame and subframe AppCache loads to work. (Closed)
Patch Set: Address review comments Created 3 years, 6 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_storage.h ('k') | content/browser/appcache/appcache_storage_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/appcache/appcache_storage.cc
diff --git a/content/browser/appcache/appcache_storage.cc b/content/browser/appcache/appcache_storage.cc
index 0299ddc1792fa3dd78317a2f1e82109f0d3b61a8..666acd566225c7100a753746cfba95056c196fb4 100644
--- a/content/browser/appcache/appcache_storage.cc
+++ b/content/browser/appcache/appcache_storage.cc
@@ -18,9 +18,11 @@ namespace content {
const int64_t AppCacheStorage::kUnitializedId = -1;
AppCacheStorage::AppCacheStorage(AppCacheServiceImpl* service)
- : last_cache_id_(kUnitializedId), last_group_id_(kUnitializedId),
- last_response_id_(kUnitializedId), service_(service) {
-}
+ : last_cache_id_(kUnitializedId),
+ last_group_id_(kUnitializedId),
+ last_response_id_(kUnitializedId),
+ service_(service),
+ weak_factory_(this) {}
AppCacheStorage::~AppCacheStorage() {
DCHECK(delegate_references_.empty());
@@ -94,6 +96,10 @@ void AppCacheStorage::LoadResponseInfo(const GURL& manifest_url,
info_load->StartIfNeeded();
}
+base::WeakPtr<AppCacheStorage> AppCacheStorage::GetWeakPtr() {
+ return weak_factory_.GetWeakPtr();
+}
+
void AppCacheStorage::UpdateUsageMapAndNotify(const GURL& origin,
int64_t new_usage) {
DCHECK_GE(new_usage, 0);
« no previous file with comments | « content/browser/appcache/appcache_storage.h ('k') | content/browser/appcache/appcache_storage_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698