| 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_STORAGE_PARTITION_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ |
| 6 #define CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ | 6 #define CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "content/browser/appcache/chrome_appcache_service.h" | 11 #include "content/browser/appcache/chrome_appcache_service.h" |
| 12 #include "content/browser/dom_storage/dom_storage_context_impl.h" | 12 #include "content/browser/dom_storage/dom_storage_context_proxy.h" |
| 13 #include "content/browser/indexed_db/indexed_db_context_impl.h" | 13 #include "content/browser/indexed_db/indexed_db_context_impl.h" |
| 14 #include "content/browser/media/webrtc_identity_store.h" | 14 #include "content/browser/media/webrtc_identity_store.h" |
| 15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 16 #include "content/public/browser/storage_partition.h" | 16 #include "content/public/browser/storage_partition.h" |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 | 19 |
| 20 class StoragePartitionImpl : public StoragePartition { | 20 class StoragePartitionImpl : public StoragePartition { |
| 21 public: | 21 public: |
| 22 CONTENT_EXPORT virtual ~StoragePartitionImpl(); | 22 CONTENT_EXPORT virtual ~StoragePartitionImpl(); |
| 23 | 23 |
| 24 // StoragePartition interface. | 24 // StoragePartition interface. |
| 25 virtual base::FilePath GetPath() OVERRIDE; | 25 virtual base::FilePath GetPath() OVERRIDE; |
| 26 virtual net::URLRequestContextGetter* GetURLRequestContext() OVERRIDE; | 26 virtual net::URLRequestContextGetter* GetURLRequestContext() OVERRIDE; |
| 27 virtual net::URLRequestContextGetter* GetMediaURLRequestContext() OVERRIDE; | 27 virtual net::URLRequestContextGetter* GetMediaURLRequestContext() OVERRIDE; |
| 28 virtual quota::QuotaManager* GetQuotaManager() OVERRIDE; | 28 virtual quota::QuotaManager* GetQuotaManager() OVERRIDE; |
| 29 virtual ChromeAppCacheService* GetAppCacheService() OVERRIDE; | 29 virtual ChromeAppCacheService* GetAppCacheService() OVERRIDE; |
| 30 virtual fileapi::FileSystemContext* GetFileSystemContext() OVERRIDE; | 30 virtual fileapi::FileSystemContext* GetFileSystemContext() OVERRIDE; |
| 31 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() OVERRIDE; | 31 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() OVERRIDE; |
| 32 virtual DOMStorageContextImpl* GetDOMStorageContext() OVERRIDE; | 32 virtual DOMStorageContextProxy* GetDOMStorageContext() OVERRIDE; |
| 33 virtual IndexedDBContextImpl* GetIndexedDBContext() OVERRIDE; | 33 virtual IndexedDBContextImpl* GetIndexedDBContext() OVERRIDE; |
| 34 | 34 |
| 35 virtual void ClearDataForOrigin( | 35 virtual void ClearDataForOrigin( |
| 36 uint32 remove_mask, | 36 uint32 remove_mask, |
| 37 uint32 quota_storage_remove_mask, | 37 uint32 quota_storage_remove_mask, |
| 38 const GURL& storage_origin, | 38 const GURL& storage_origin, |
| 39 net::URLRequestContextGetter* request_context_getter) OVERRIDE; | 39 net::URLRequestContextGetter* request_context_getter) OVERRIDE; |
| 40 virtual void ClearDataForUnboundedRange( | 40 virtual void ClearDataForUnboundedRange( |
| 41 uint32 remove_mask, | 41 uint32 remove_mask, |
| 42 uint32 quota_storage_remove_mask) OVERRIDE; | 42 uint32 quota_storage_remove_mask) OVERRIDE; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 68 // Quota managed data uses a different bitmask for types than | 68 // Quota managed data uses a different bitmask for types than |
| 69 // StoragePartition uses. This method generates that mask. | 69 // StoragePartition uses. This method generates that mask. |
| 70 static int GenerateQuotaClientMask(uint32 remove_mask); | 70 static int GenerateQuotaClientMask(uint32 remove_mask); |
| 71 | 71 |
| 72 CONTENT_EXPORT StoragePartitionImpl( | 72 CONTENT_EXPORT StoragePartitionImpl( |
| 73 const base::FilePath& partition_path, | 73 const base::FilePath& partition_path, |
| 74 quota::QuotaManager* quota_manager, | 74 quota::QuotaManager* quota_manager, |
| 75 ChromeAppCacheService* appcache_service, | 75 ChromeAppCacheService* appcache_service, |
| 76 fileapi::FileSystemContext* filesystem_context, | 76 fileapi::FileSystemContext* filesystem_context, |
| 77 webkit_database::DatabaseTracker* database_tracker, | 77 webkit_database::DatabaseTracker* database_tracker, |
| 78 DOMStorageContextImpl* dom_storage_context, | 78 DOMStorageContextProxy* dom_storage_context, |
| 79 IndexedDBContextImpl* indexed_db_context, | 79 IndexedDBContextImpl* indexed_db_context, |
| 80 scoped_ptr<WebRTCIdentityStore> webrtc_identity_store); | 80 scoped_ptr<WebRTCIdentityStore> webrtc_identity_store); |
| 81 | 81 |
| 82 void ClearDataImpl(uint32 remove_mask, | 82 void ClearDataImpl(uint32 remove_mask, |
| 83 uint32 quota_storage_remove_mask, | 83 uint32 quota_storage_remove_mask, |
| 84 const GURL& remove_origin, | 84 const GURL& remove_origin, |
| 85 net::URLRequestContextGetter* rq_context, | 85 net::URLRequestContextGetter* rq_context, |
| 86 const base::Time begin, | 86 const base::Time begin, |
| 87 const base::Time end, | 87 const base::Time end, |
| 88 const base::Closure& callback); | 88 const base::Closure& callback); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 103 void SetMediaURLRequestContext( | 103 void SetMediaURLRequestContext( |
| 104 net::URLRequestContextGetter* media_url_request_context); | 104 net::URLRequestContextGetter* media_url_request_context); |
| 105 | 105 |
| 106 base::FilePath partition_path_; | 106 base::FilePath partition_path_; |
| 107 scoped_refptr<net::URLRequestContextGetter> url_request_context_; | 107 scoped_refptr<net::URLRequestContextGetter> url_request_context_; |
| 108 scoped_refptr<net::URLRequestContextGetter> media_url_request_context_; | 108 scoped_refptr<net::URLRequestContextGetter> media_url_request_context_; |
| 109 scoped_refptr<quota::QuotaManager> quota_manager_; | 109 scoped_refptr<quota::QuotaManager> quota_manager_; |
| 110 scoped_refptr<ChromeAppCacheService> appcache_service_; | 110 scoped_refptr<ChromeAppCacheService> appcache_service_; |
| 111 scoped_refptr<fileapi::FileSystemContext> filesystem_context_; | 111 scoped_refptr<fileapi::FileSystemContext> filesystem_context_; |
| 112 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; | 112 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; |
| 113 scoped_refptr<DOMStorageContextImpl> dom_storage_context_; | 113 scoped_refptr<DOMStorageContextProxy> dom_storage_context_; |
| 114 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; | 114 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; |
| 115 scoped_ptr<WebRTCIdentityStore> webrtc_identity_store_; | 115 scoped_ptr<WebRTCIdentityStore> webrtc_identity_store_; |
| 116 | 116 |
| 117 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); | 117 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 } // namespace content | 120 } // namespace content |
| 121 | 121 |
| 122 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ | 122 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ |
| OLD | NEW |