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

Unified Diff: content/browser/worker_host/worker_storage_partition.h

Issue 258513002: Introduce WorkerStoragePartitionId and use it in SharedWorkerInstance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hold WorkerStoragePartition in SharedWorkerMessageFilter Created 6 years, 8 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/worker_host/worker_storage_partition.h
diff --git a/content/browser/worker_host/worker_storage_partition.h b/content/browser/worker_host/worker_storage_partition.h
index 2f4bb235b0ae38954be57bf51d96cc192d423400..aebd683c3f533e8e54ce3c4e1d1af2bb49e294aa 100644
--- a/content/browser/worker_host/worker_storage_partition.h
+++ b/content/browser/worker_host/worker_storage_partition.h
@@ -107,6 +107,28 @@ class CONTENT_EXPORT WorkerStoragePartition {
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
};
+// WorkerStoragePartitionId can be used to identify each
+// WorkerStoragePartitions. We can hold WorkerStoragePartitionId without
+// extending the lifetime of all objects in the WorkerStoragePartition.
+// That means that holding a WorkerStoragePartitionId doesn't mean the
+// corresponding partition and its members are kept alive.
+class CONTENT_EXPORT WorkerStoragePartitionId {
+ public:
+ explicit WorkerStoragePartitionId(const WorkerStoragePartition& partition);
+ ~WorkerStoragePartitionId();
+ bool Equals(const WorkerStoragePartitionId& other) const;
+
+ private:
+ net::URLRequestContextGetter* url_request_context_;
+ net::URLRequestContextGetter* media_url_request_context_;
+ ChromeAppCacheService* appcache_service_;
+ quota::QuotaManager* quota_manager_;
+ fileapi::FileSystemContext* filesystem_context_;
+ webkit_database::DatabaseTracker* database_tracker_;
+ IndexedDBContextImpl* indexed_db_context_;
+ ServiceWorkerContextWrapper* service_worker_context_;
+};
+
} // namespace content
#endif // CONTENT_BROWSER_WORKER_HOST_WORKER_STORAGE_PARTITION_H_
« no previous file with comments | « content/browser/shared_worker/shared_worker_service_impl.cc ('k') | content/browser/worker_host/worker_storage_partition.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698