| 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/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
| 10 #include "base/supports_user_data.h" | 10 #include "base/supports_user_data.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 static DownloadManager* GetDownloadManager(BrowserContext* browser_context); | 58 static DownloadManager* GetDownloadManager(BrowserContext* browser_context); |
| 59 static quota::QuotaManager* GetQuotaManager(BrowserContext* browser_context); | 59 static quota::QuotaManager* GetQuotaManager(BrowserContext* browser_context); |
| 60 static IndexedDBContext* GetIndexedDBContext(BrowserContext* browser_context); | 60 static IndexedDBContext* GetIndexedDBContext(BrowserContext* browser_context); |
| 61 static webkit_database::DatabaseTracker* GetDatabaseTracker( | 61 static webkit_database::DatabaseTracker* GetDatabaseTracker( |
| 62 BrowserContext* browser_context); | 62 BrowserContext* browser_context); |
| 63 static appcache::AppCacheService* GetAppCacheService( | 63 static appcache::AppCacheService* GetAppCacheService( |
| 64 BrowserContext* browser_context); | 64 BrowserContext* browser_context); |
| 65 static fileapi::FileSystemContext* GetFileSystemContext( | 65 static fileapi::FileSystemContext* GetFileSystemContext( |
| 66 BrowserContext* browser_context); | 66 BrowserContext* browser_context); |
| 67 | 67 |
| 68 static content::StoragePartition* GetStoragePartition( | 68 static bool IsValidPartitionId(BrowserContext* browser_context, |
| 69 BrowserContext* browser_context, SiteInstance* site_instance); | 69 const std::string& partition_id); |
| 70 static StoragePartition* GetStoragePartition(BrowserContext* browser_context, |
| 71 SiteInstance* site_instance); |
| 72 static StoragePartition* GetStoragePartitionById( |
| 73 BrowserContext* browser_context, |
| 74 const std::string& partition_id); |
| 70 static void ForEachStoragePartition( | 75 static void ForEachStoragePartition( |
| 71 BrowserContext* browser_context, | 76 BrowserContext* browser_context, |
| 72 const StoragePartitionCallback& callback); | 77 const StoragePartitionCallback& callback); |
| 73 | 78 |
| 74 // DON'T USE THIS. GetDefaultStoragePartition() is going away. | 79 // DON'T USE THIS. GetDefaultStoragePartition() is going away. |
| 75 // Use GetStoragePartition() instead. Ask ajwong@ if you have problems. | 80 // Use GetStoragePartition() instead. Ask ajwong@ if you have problems. |
| 76 static content::StoragePartition* GetDefaultStoragePartition( | 81 static content::StoragePartition* GetDefaultStoragePartition( |
| 77 BrowserContext* browser_context); | 82 BrowserContext* browser_context); |
| 78 | 83 |
| 79 // Ensures that the corresponding ResourceContext is initialized. Normally the | 84 // Ensures that the corresponding ResourceContext is initialized. Normally the |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 struct hash<content::BrowserContext*> { | 156 struct hash<content::BrowserContext*> { |
| 152 std::size_t operator()(content::BrowserContext* const& p) const { | 157 std::size_t operator()(content::BrowserContext* const& p) const { |
| 153 return reinterpret_cast<std::size_t>(p); | 158 return reinterpret_cast<std::size_t>(p); |
| 154 } | 159 } |
| 155 }; | 160 }; |
| 156 | 161 |
| 157 } // namespace BASE_HASH_NAMESPACE | 162 } // namespace BASE_HASH_NAMESPACE |
| 158 #endif | 163 #endif |
| 159 | 164 |
| 160 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 165 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
| OLD | NEW |