OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 STORAGE_BROWSER_BLOB_BLOB_STORAGE_CONTEXT_H_ | 5 #ifndef STORAGE_BROWSER_BLOB_BLOB_STORAGE_CONTEXT_H_ |
6 #define STORAGE_BROWSER_BLOB_BLOB_STORAGE_CONTEXT_H_ | 6 #define STORAGE_BROWSER_BLOB_BLOB_STORAGE_CONTEXT_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "storage/browser/blob/blob_storage_registry.h" | 24 #include "storage/browser/blob/blob_storage_registry.h" |
25 #include "storage/browser/storage_browser_export.h" | 25 #include "storage/browser/storage_browser_export.h" |
26 #include "storage/common/blob_storage/blob_storage_constants.h" | 26 #include "storage/common/blob_storage/blob_storage_constants.h" |
27 | 27 |
28 class GURL; | 28 class GURL; |
29 | 29 |
30 namespace content { | 30 namespace content { |
31 class BlobDispatcherHost; | 31 class BlobDispatcherHost; |
32 class BlobDispatcherHostTest; | 32 class BlobDispatcherHostTest; |
33 class BlobStorageBrowserTest; | 33 class BlobStorageBrowserTest; |
| 34 class ChromeBlobStorageContext; |
34 } | 35 } |
35 | 36 |
36 namespace storage { | 37 namespace storage { |
37 class BlobDataBuilder; | 38 class BlobDataBuilder; |
38 class BlobDataHandle; | 39 class BlobDataHandle; |
39 class BlobDataSnapshot; | 40 class BlobDataSnapshot; |
40 class ShareableBlobDataItem; | 41 class ShareableBlobDataItem; |
41 | 42 |
42 // This class handles the logistics of blob storage within the browser process. | 43 // This class handles the logistics of blob storage within the browser process. |
43 // This class is not threadsafe, access on IO thread. In Chromium there is one | 44 // This class is not threadsafe, access on IO thread. In Chromium there is one |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 const BlobMemoryController& memory_controller() { return memory_controller_; } | 117 const BlobMemoryController& memory_controller() { return memory_controller_; } |
117 | 118 |
118 base::WeakPtr<BlobStorageContext> AsWeakPtr() { | 119 base::WeakPtr<BlobStorageContext> AsWeakPtr() { |
119 return ptr_factory_.GetWeakPtr(); | 120 return ptr_factory_.GetWeakPtr(); |
120 } | 121 } |
121 | 122 |
122 protected: | 123 protected: |
123 friend class content::BlobDispatcherHost; | 124 friend class content::BlobDispatcherHost; |
124 friend class content::BlobDispatcherHostTest; | 125 friend class content::BlobDispatcherHostTest; |
125 friend class content::BlobStorageBrowserTest; | 126 friend class content::BlobStorageBrowserTest; |
| 127 friend class content::ChromeBlobStorageContext; |
126 friend class BlobTransportHost; | 128 friend class BlobTransportHost; |
127 friend class BlobTransportHostTest; | 129 friend class BlobTransportHostTest; |
128 friend class BlobDataHandle; | 130 friend class BlobDataHandle; |
129 friend class BlobDataHandle::BlobDataHandleShared; | 131 friend class BlobDataHandle::BlobDataHandleShared; |
130 friend class BlobFlattenerTest; | 132 friend class BlobFlattenerTest; |
131 friend class BlobSliceTest; | 133 friend class BlobSliceTest; |
132 friend class BlobStorageContextTest; | 134 friend class BlobStorageContextTest; |
133 | 135 |
134 enum class TransportQuotaType { MEMORY, FILE }; | 136 enum class TransportQuotaType { MEMORY, FILE }; |
135 | 137 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 BlobStorageRegistry registry_; | 260 BlobStorageRegistry registry_; |
259 BlobMemoryController memory_controller_; | 261 BlobMemoryController memory_controller_; |
260 base::WeakPtrFactory<BlobStorageContext> ptr_factory_; | 262 base::WeakPtrFactory<BlobStorageContext> ptr_factory_; |
261 | 263 |
262 DISALLOW_COPY_AND_ASSIGN(BlobStorageContext); | 264 DISALLOW_COPY_AND_ASSIGN(BlobStorageContext); |
263 }; | 265 }; |
264 | 266 |
265 } // namespace storage | 267 } // namespace storage |
266 | 268 |
267 #endif // STORAGE_BROWSER_BLOB_BLOB_STORAGE_CONTEXT_H_ | 269 #endif // STORAGE_BROWSER_BLOB_BLOB_STORAGE_CONTEXT_H_ |
OLD | NEW |