| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_WORKER_HOST_WORKER_STORAGE_PARTITION_H_ | 5 #ifndef CONTENT_BROWSER_WORKER_HOST_WORKER_STORAGE_PARTITION_H_ |
| 6 #define CONTENT_BROWSER_WORKER_HOST_WORKER_STORAGE_PARTITION_H_ | 6 #define CONTENT_BROWSER_WORKER_HOST_WORKER_STORAGE_PARTITION_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "content/common/content_export.h" |
| 9 | 10 |
| 10 namespace quota { | 11 namespace quota { |
| 11 class QuotaManager; | 12 class QuotaManager; |
| 12 } | 13 } |
| 13 | 14 |
| 14 namespace fileapi { | 15 namespace fileapi { |
| 15 class FileSystemContext; | 16 class FileSystemContext; |
| 16 } // namespace fileapi | 17 } // namespace fileapi |
| 17 | 18 |
| 18 namespace net { | 19 namespace net { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 32 // StoragePartition meant for the UI so we can't use it directly in many | 33 // StoragePartition meant for the UI so we can't use it directly in many |
| 33 // Worker APIs that run on the IO thread. While we could make it RefCounted, | 34 // Worker APIs that run on the IO thread. While we could make it RefCounted, |
| 34 // the Worker system is the only place that really needs access on the IO | 35 // the Worker system is the only place that really needs access on the IO |
| 35 // thread. Instead of changing the lifetime semantics of StoragePartition, | 36 // thread. Instead of changing the lifetime semantics of StoragePartition, |
| 36 // we just create a parallel struct here to simplify the APIs of various | 37 // we just create a parallel struct here to simplify the APIs of various |
| 37 // methods in WorkerServiceImpl. | 38 // methods in WorkerServiceImpl. |
| 38 // | 39 // |
| 39 // This class is effectively a struct, but we make it a class because we want to | 40 // This class is effectively a struct, but we make it a class because we want to |
| 40 // define copy constructors, assignment operators, and an Equals() function for | 41 // define copy constructors, assignment operators, and an Equals() function for |
| 41 // it which makes it look awkward as a struct. | 42 // it which makes it look awkward as a struct. |
| 42 class WorkerStoragePartition { | 43 class CONTENT_EXPORT WorkerStoragePartition { |
| 43 public: | 44 public: |
| 44 WorkerStoragePartition( | 45 WorkerStoragePartition( |
| 45 net::URLRequestContextGetter* url_request_context, | 46 net::URLRequestContextGetter* url_request_context, |
| 46 net::URLRequestContextGetter* media_url_request_context, | 47 net::URLRequestContextGetter* media_url_request_context, |
| 47 ChromeAppCacheService* appcache_service, | 48 ChromeAppCacheService* appcache_service, |
| 48 quota::QuotaManager* quota_manager, | 49 quota::QuotaManager* quota_manager, |
| 49 fileapi::FileSystemContext* filesystem_context, | 50 fileapi::FileSystemContext* filesystem_context, |
| 50 webkit_database::DatabaseTracker* database_tracker, | 51 webkit_database::DatabaseTracker* database_tracker, |
| 51 IndexedDBContextImpl* indexed_db_context); | 52 IndexedDBContextImpl* indexed_db_context); |
| 52 ~WorkerStoragePartition(); | 53 ~WorkerStoragePartition(); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 scoped_refptr<ChromeAppCacheService> appcache_service_; | 96 scoped_refptr<ChromeAppCacheService> appcache_service_; |
| 96 scoped_refptr<quota::QuotaManager> quota_manager_; | 97 scoped_refptr<quota::QuotaManager> quota_manager_; |
| 97 scoped_refptr<fileapi::FileSystemContext> filesystem_context_; | 98 scoped_refptr<fileapi::FileSystemContext> filesystem_context_; |
| 98 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; | 99 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; |
| 99 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; | 100 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; |
| 100 }; | 101 }; |
| 101 | 102 |
| 102 } // namespace content | 103 } // namespace content |
| 103 | 104 |
| 104 #endif // CONTENT_BROWSER_WORKER_HOST_WORKER_STORAGE_PARTITION_H_ | 105 #endif // CONTENT_BROWSER_WORKER_HOST_WORKER_STORAGE_PARTITION_H_ |
| OLD | NEW |