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

Unified Diff: content/browser/storage_partition_impl.h

Issue 852463002: Keep track of ServiceWorkerContext's BrowserContext and expose it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nullptr
Patch Set: Created 5 years, 11 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
Index: content/browser/storage_partition_impl.h
diff --git a/content/browser/storage_partition_impl.h b/content/browser/storage_partition_impl.h
index f53447eb1b4e1d4610e402e35c7ed5cf3a2d9787..e83a26b61edab1258a4657bb45427d0ab51d65a7 100644
--- a/content/browser/storage_partition_impl.h
+++ b/content/browser/storage_partition_impl.h
@@ -65,6 +65,8 @@ class StoragePartitionImpl : public StoragePartition {
WebRTCIdentityStore* GetWebRTCIdentityStore();
+ BrowserContext* browser_context() const;
+
struct DataDeletionHelper;
struct QuotaManagedDataDeletionHelper;
@@ -113,6 +115,7 @@ class StoragePartitionImpl : public StoragePartition {
const base::FilePath& profile_path);
CONTENT_EXPORT StoragePartitionImpl(
+ BrowserContext* browser_context,
const base::FilePath& partition_path,
storage::QuotaManager* quota_manager,
ChromeAppCacheService* appcache_service,
@@ -169,6 +172,11 @@ class StoragePartitionImpl : public StoragePartition {
scoped_refptr<HostZoomLevelContext> host_zoom_level_context_;
scoped_refptr<NavigatorConnectContext> navigator_connect_context_;
+ // Weak pointer that should always be valid. The BrowserContext owns the
michaeln 2015/01/13 21:27:32 "Raw pointer" is more accurate since it's not a We
mlamouri (slow - plz ping) 2015/01/14 15:46:24 Done.
+ // StoragePartitionImplMap which then owns StoragePartitionImpl. When the
+ // BrowserContext is destroyed, |this| will be destroyed too.
+ BrowserContext* browser_context_;
+
DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl);
};

Powered by Google App Engine
This is Rietveld 408576698