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

Side by Side Diff: content/browser/storage_partition_impl.h

Issue 11147026: Initial refactor to get profiles to propagate storage partition details. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes based on Albert's review. Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
(...skipping 18 matching lines...) Expand all
29 virtual FilePath GetPath() OVERRIDE; 29 virtual FilePath GetPath() OVERRIDE;
30 virtual net::URLRequestContextGetter* GetURLRequestContext() OVERRIDE; 30 virtual net::URLRequestContextGetter* GetURLRequestContext() OVERRIDE;
31 virtual net::URLRequestContextGetter* GetMediaURLRequestContext() OVERRIDE; 31 virtual net::URLRequestContextGetter* GetMediaURLRequestContext() OVERRIDE;
32 virtual quota::QuotaManager* GetQuotaManager() OVERRIDE; 32 virtual quota::QuotaManager* GetQuotaManager() OVERRIDE;
33 virtual ChromeAppCacheService* GetAppCacheService() OVERRIDE; 33 virtual ChromeAppCacheService* GetAppCacheService() OVERRIDE;
34 virtual fileapi::FileSystemContext* GetFileSystemContext() OVERRIDE; 34 virtual fileapi::FileSystemContext* GetFileSystemContext() OVERRIDE;
35 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() OVERRIDE; 35 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() OVERRIDE;
36 virtual DOMStorageContextImpl* GetDOMStorageContext() OVERRIDE; 36 virtual DOMStorageContextImpl* GetDOMStorageContext() OVERRIDE;
37 virtual IndexedDBContextImpl* GetIndexedDBContext() OVERRIDE; 37 virtual IndexedDBContextImpl* GetIndexedDBContext() OVERRIDE;
38 38
39 // Returns a boolean to indicate whether this partition should be persisted on
40 // disk or just be kept in memory.
41 //
42 // TODO(nasko): Remove this function from the public API once
43 // URLRequestContextGetter's creation is moved into StoragePartition.
44 bool InMemory();
45
39 private: 46 private:
40 friend class StoragePartitionImplMap; 47 friend class StoragePartitionImplMap;
41 48
42 StoragePartitionImpl( 49 StoragePartitionImpl(
43 const FilePath& partition_path, 50 const FilePath& partition_path,
44 quota::QuotaManager* quota_manager, 51 quota::QuotaManager* quota_manager,
45 ChromeAppCacheService* appcache_service, 52 ChromeAppCacheService* appcache_service,
46 fileapi::FileSystemContext* filesystem_context, 53 fileapi::FileSystemContext* filesystem_context,
47 webkit_database::DatabaseTracker* database_tracker, 54 webkit_database::DatabaseTracker* database_tracker,
48 DOMStorageContextImpl* dom_storage_context, 55 DOMStorageContextImpl* dom_storage_context,
(...skipping 18 matching lines...) Expand all
67 FilePath partition_path_; 74 FilePath partition_path_;
68 scoped_refptr<net::URLRequestContextGetter> url_request_context_; 75 scoped_refptr<net::URLRequestContextGetter> url_request_context_;
69 scoped_refptr<net::URLRequestContextGetter> media_url_request_context_; 76 scoped_refptr<net::URLRequestContextGetter> media_url_request_context_;
70 scoped_refptr<quota::QuotaManager> quota_manager_; 77 scoped_refptr<quota::QuotaManager> quota_manager_;
71 scoped_refptr<ChromeAppCacheService> appcache_service_; 78 scoped_refptr<ChromeAppCacheService> appcache_service_;
72 scoped_refptr<fileapi::FileSystemContext> filesystem_context_; 79 scoped_refptr<fileapi::FileSystemContext> filesystem_context_;
73 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; 80 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_;
74 scoped_refptr<DOMStorageContextImpl> dom_storage_context_; 81 scoped_refptr<DOMStorageContextImpl> dom_storage_context_;
75 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; 82 scoped_refptr<IndexedDBContextImpl> indexed_db_context_;
76 83
84
85 // Boolean to indicate whether this partition should be persisted or not.
86 bool in_memory_;
87
77 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); 88 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl);
78 }; 89 };
79 90
80 } // namespace content 91 } // namespace content
81 92
82 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ 93 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698