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/file_path.h" | 9 #include "base/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_impl.h" |
13 #include "content/browser/in_process_webkit/indexed_db_context_impl.h" | 13 #include "content/browser/in_process_webkit/indexed_db_context_impl.h" |
14 #include "content/public/browser/storage_partition.h" | 14 #include "content/public/browser/storage_partition.h" |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
18 class StoragePartitionImpl : public StoragePartition { | 18 class StoragePartitionImpl : public StoragePartition { |
19 public: | 19 public: |
20 virtual ~StoragePartitionImpl(); | 20 virtual ~StoragePartitionImpl(); |
21 | 21 |
22 // TODO(ajwong): Break the direct dependency on |context|. We only | 22 // TODO(ajwong): Break the direct dependency on |context|. We only |
23 // need 3 pieces of info from it. | 23 // need 3 pieces of info from it. |
24 static StoragePartitionImpl* Create(BrowserContext* context, | 24 static StoragePartitionImpl* Create(BrowserContext* context, |
25 const std::string& partition_id, | 25 const std::string& partition_id, |
26 const FilePath& profile_path); | 26 const FilePath& profile_path, |
| 27 bool in_memory); |
27 | 28 |
28 // StoragePartition interface. | 29 // StoragePartition interface. |
29 virtual FilePath GetPath() OVERRIDE; | 30 virtual FilePath GetPath() OVERRIDE; |
30 virtual net::URLRequestContextGetter* GetURLRequestContext() OVERRIDE; | 31 virtual net::URLRequestContextGetter* GetURLRequestContext() OVERRIDE; |
31 virtual net::URLRequestContextGetter* GetMediaURLRequestContext() OVERRIDE; | 32 virtual net::URLRequestContextGetter* GetMediaURLRequestContext() OVERRIDE; |
32 virtual quota::QuotaManager* GetQuotaManager() OVERRIDE; | 33 virtual quota::QuotaManager* GetQuotaManager() OVERRIDE; |
33 virtual ChromeAppCacheService* GetAppCacheService() OVERRIDE; | 34 virtual ChromeAppCacheService* GetAppCacheService() OVERRIDE; |
34 virtual fileapi::FileSystemContext* GetFileSystemContext() OVERRIDE; | 35 virtual fileapi::FileSystemContext* GetFileSystemContext() OVERRIDE; |
35 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() OVERRIDE; | 36 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() OVERRIDE; |
36 virtual DOMStorageContextImpl* GetDOMStorageContext() OVERRIDE; | 37 virtual DOMStorageContextImpl* GetDOMStorageContext() OVERRIDE; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; | 74 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; |
74 scoped_refptr<DOMStorageContextImpl> dom_storage_context_; | 75 scoped_refptr<DOMStorageContextImpl> dom_storage_context_; |
75 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; | 76 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; |
76 | 77 |
77 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); | 78 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); |
78 }; | 79 }; |
79 | 80 |
80 } // namespace content | 81 } // namespace content |
81 | 82 |
82 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ | 83 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ |
OLD | NEW |