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

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

Issue 10600009: Support partitioning of storage contexts based on render_id. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Forgot a funciton. Created 8 years, 5 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_STORAGE_PARTITION_H_
6 #define CONTENT_BROWSER_STORAGE_PARTITION_H_
7
8 #include "base/file_path.h"
9 #include "base/memory/ref_counted.h"
10
11 namespace content {
12 class BrowserContext;
13 class IndexedDBContext;
14 }
15
16 namespace fileapi {
17 class FileSystemContext;
18 }
19
20 namespace quota {
21 class QuotaManager;
22 }
23
24 namespace webkit_database {
25 class DatabaseTracker;
26 }
27
28 class ChromeAppCacheService;
29 class DOMStorageContextImpl;
30
31 // Defines the what persistent state a child process can access.
32 //
33 // The StoragePartition defines the view each child process has of the
34 // persistent state inside the BrowserContext. This is used to implement
35 // isolated storage where a renderer with isolated storage cannot see
36 // the cookies, localStorage, etc., that normal web renderers have access to.
37 class StoragePartition {
jam 2012/07/11 23:36:31 nit: new code should be in the content namespace
38 public:
39 ~StoragePartition();
40
41 // TODO(ajwong): Break the direct dependency on |context|. We only
42 // need 3 pieces of info from it.
43 static StoragePartition* Create(content::BrowserContext* context,
44 const FilePath& partition_path);
45
46 quota::QuotaManager* quota_manager() { return quota_manager_; }
47 ChromeAppCacheService* appcache_service() { return appcache_service_; }
48 fileapi::FileSystemContext* filesystem_context() {
49 return filesystem_context_;
50 }
51 webkit_database::DatabaseTracker* database_tracker() {
52 return database_tracker_;
53 }
54 DOMStorageContextImpl* dom_storage_context() { return dom_storage_context_; }
55 content::IndexedDBContext* indexed_db_context() {
56 return indexed_db_context_;
57 }
58
59 private:
60 StoragePartition(const FilePath& partition_path,
61 quota::QuotaManager* quota_manager,
62 ChromeAppCacheService* appcache_service,
63 fileapi::FileSystemContext* filesystem_context,
64 webkit_database::DatabaseTracker* database_tracker,
65 DOMStorageContextImpl* dom_storage_context,
66 content::IndexedDBContext* indexed_db_context);
67
68 FilePath partition_path_;
69 scoped_refptr<quota::QuotaManager> quota_manager_;
70 scoped_refptr<ChromeAppCacheService> appcache_service_;
71 scoped_refptr<fileapi::FileSystemContext> filesystem_context_;
72 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_;
73 scoped_refptr<DOMStorageContextImpl> dom_storage_context_;
74 scoped_refptr<content::IndexedDBContext> indexed_db_context_;
75 };
76
77 #endif // CONTENT_BROWSER_STORAGE_PARTITION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698