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" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 | 12 |
13 namespace appcache { | 13 namespace appcache { |
14 class AppCacheService; | 14 class AppCacheService; |
15 } | 15 } |
16 | 16 |
17 namespace fileapi { | 17 namespace fileapi { |
18 class FileSystemContext; | 18 class FileSystemContext; |
19 } | 19 } |
20 | 20 |
21 namespace net { | 21 namespace net { |
22 class URLRequestContextGetter; | 22 class URLRequestContextGetter; |
23 } | 23 } |
24 | 24 |
25 namespace quota { | 25 namespace quota { |
26 class QuotaManager; | |
27 class SpecialStoragePolicy; | 26 class SpecialStoragePolicy; |
28 } | 27 } |
29 | 28 |
30 namespace webkit_database { | 29 namespace webkit_database { |
31 class DatabaseTracker; | 30 class DatabaseTracker; |
32 } | 31 } |
33 | 32 |
34 class FilePath; | 33 class FilePath; |
35 | 34 |
36 namespace content { | 35 namespace content { |
(...skipping 12 matching lines...) Expand all Loading... |
49 // It lives on the UI thread. All these methods must only be called on the UI | 48 // It lives on the UI thread. All these methods must only be called on the UI |
50 // thread. | 49 // thread. |
51 class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { | 50 class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { |
52 public: | 51 public: |
53 // Used in ForEachStoragePartition(). The first argument is the partition id. | 52 // Used in ForEachStoragePartition(). The first argument is the partition id. |
54 // The second argument is the StoragePartition object for that partition id. | 53 // The second argument is the StoragePartition object for that partition id. |
55 typedef base::Callback<void(const std::string&, StoragePartition*)> | 54 typedef base::Callback<void(const std::string&, StoragePartition*)> |
56 StoragePartitionCallback; | 55 StoragePartitionCallback; |
57 | 56 |
58 static DownloadManager* GetDownloadManager(BrowserContext* browser_context); | 57 static DownloadManager* GetDownloadManager(BrowserContext* browser_context); |
59 static quota::QuotaManager* GetQuotaManager(BrowserContext* browser_context); | |
60 static IndexedDBContext* GetIndexedDBContext(BrowserContext* browser_context); | 58 static IndexedDBContext* GetIndexedDBContext(BrowserContext* browser_context); |
61 static webkit_database::DatabaseTracker* GetDatabaseTracker( | 59 static webkit_database::DatabaseTracker* GetDatabaseTracker( |
62 BrowserContext* browser_context); | 60 BrowserContext* browser_context); |
63 static appcache::AppCacheService* GetAppCacheService( | 61 static appcache::AppCacheService* GetAppCacheService( |
64 BrowserContext* browser_context); | 62 BrowserContext* browser_context); |
65 static fileapi::FileSystemContext* GetFileSystemContext( | 63 static fileapi::FileSystemContext* GetFileSystemContext( |
66 BrowserContext* browser_context); | 64 BrowserContext* browser_context); |
67 | 65 |
68 static content::StoragePartition* GetStoragePartition( | 66 static content::StoragePartition* GetStoragePartition( |
69 BrowserContext* browser_context, SiteInstance* site_instance); | 67 BrowserContext* browser_context, SiteInstance* site_instance); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 struct hash<content::BrowserContext*> { | 154 struct hash<content::BrowserContext*> { |
157 std::size_t operator()(content::BrowserContext* const& p) const { | 155 std::size_t operator()(content::BrowserContext* const& p) const { |
158 return reinterpret_cast<std::size_t>(p); | 156 return reinterpret_cast<std::size_t>(p); |
159 } | 157 } |
160 }; | 158 }; |
161 | 159 |
162 } // namespace BASE_HASH_NAMESPACE | 160 } // namespace BASE_HASH_NAMESPACE |
163 #endif | 161 #endif |
164 | 162 |
165 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 163 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
OLD | NEW |