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_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
7 | 7 |
8 #include "base/hash_tables.h" | 8 #include "base/hash_tables.h" |
9 #include "base/supports_user_data.h" | 9 #include "base/supports_user_data.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // It lives on the UI thread. All these methods must only be called on the UI | 46 // It lives on the UI thread. All these methods must only be called on the UI |
47 // thread. | 47 // thread. |
48 class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { | 48 class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { |
49 public: | 49 public: |
50 static DownloadManager* GetDownloadManager(BrowserContext* browser_context); | 50 static DownloadManager* GetDownloadManager(BrowserContext* browser_context); |
51 static quota::QuotaManager* GetQuotaManager(BrowserContext* browser_context); | 51 static quota::QuotaManager* GetQuotaManager(BrowserContext* browser_context); |
52 static DOMStorageContext* GetDefaultDOMStorageContext( | 52 static DOMStorageContext* GetDefaultDOMStorageContext( |
53 BrowserContext* browser_context); | 53 BrowserContext* browser_context); |
54 static DOMStorageContext* GetDOMStorageContext( | 54 static DOMStorageContext* GetDOMStorageContext( |
55 BrowserContext* browser_context, int renderer_child_id); | 55 BrowserContext* browser_context, int renderer_child_id); |
| 56 static content::DOMStorageContext* GetDOMStorageContextByPartitionId( |
| 57 BrowserContext* browser_context, const std::string& partition_id); |
56 static IndexedDBContext* GetIndexedDBContext(BrowserContext* browser_context); | 58 static IndexedDBContext* GetIndexedDBContext(BrowserContext* browser_context); |
57 static webkit_database::DatabaseTracker* GetDatabaseTracker( | 59 static webkit_database::DatabaseTracker* GetDatabaseTracker( |
58 BrowserContext* browser_context); | 60 BrowserContext* browser_context); |
59 static appcache::AppCacheService* GetAppCacheService( | 61 static appcache::AppCacheService* GetAppCacheService( |
60 BrowserContext* browser_context); | 62 BrowserContext* browser_context); |
61 static fileapi::FileSystemContext* GetFileSystemContext( | 63 static fileapi::FileSystemContext* GetFileSystemContext( |
62 BrowserContext* browser_context); | 64 BrowserContext* browser_context); |
63 | 65 |
64 // Ensures that the corresponding ResourceContext is initialized. Normally the | 66 // Ensures that the corresponding ResourceContext is initialized. Normally the |
65 // BrowserContext initializs the corresponding getters when its objects are | 67 // BrowserContext initializs the corresponding getters when its objects are |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 struct hash<content::BrowserContext*> { | 138 struct hash<content::BrowserContext*> { |
137 std::size_t operator()(content::BrowserContext* const& p) const { | 139 std::size_t operator()(content::BrowserContext* const& p) const { |
138 return reinterpret_cast<std::size_t>(p); | 140 return reinterpret_cast<std::size_t>(p); |
139 } | 141 } |
140 }; | 142 }; |
141 | 143 |
142 } // namespace BASE_HASH_NAMESPACE | 144 } // namespace BASE_HASH_NAMESPACE |
143 #endif | 145 #endif |
144 | 146 |
145 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 147 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
OLD | NEW |