| 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/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 namespace net { | 24 namespace net { |
| 25 class URLRequestContextGetter; | 25 class URLRequestContextGetter; |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace quota { | 28 namespace quota { |
| 29 class SpecialStoragePolicy; | 29 class SpecialStoragePolicy; |
| 30 } | 30 } |
| 31 | 31 |
| 32 namespace content { | 32 namespace content { |
| 33 | 33 |
| 34 class BlobContext; |
| 34 class BrowserPluginGuestManagerDelegate; | 35 class BrowserPluginGuestManagerDelegate; |
| 35 class DownloadManager; | 36 class DownloadManager; |
| 36 class DownloadManagerDelegate; | 37 class DownloadManagerDelegate; |
| 37 class GeolocationPermissionContext; | 38 class GeolocationPermissionContext; |
| 38 class IndexedDBContext; | 39 class IndexedDBContext; |
| 39 class ResourceContext; | 40 class ResourceContext; |
| 40 class SiteInstance; | 41 class SiteInstance; |
| 41 class StoragePartition; | 42 class StoragePartition; |
| 42 | 43 |
| 43 // This class holds the context needed for a browsing session. | 44 // This class holds the context needed for a browsing session. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 70 static void GarbageCollectStoragePartitions( | 71 static void GarbageCollectStoragePartitions( |
| 71 BrowserContext* browser_context, | 72 BrowserContext* browser_context, |
| 72 scoped_ptr<base::hash_set<base::FilePath> > active_paths, | 73 scoped_ptr<base::hash_set<base::FilePath> > active_paths, |
| 73 const base::Closure& done); | 74 const base::Closure& done); |
| 74 | 75 |
| 75 // DON'T USE THIS. GetDefaultStoragePartition() is going away. | 76 // DON'T USE THIS. GetDefaultStoragePartition() is going away. |
| 76 // Use GetStoragePartition() instead. Ask ajwong@ if you have problems. | 77 // Use GetStoragePartition() instead. Ask ajwong@ if you have problems. |
| 77 static content::StoragePartition* GetDefaultStoragePartition( | 78 static content::StoragePartition* GetDefaultStoragePartition( |
| 78 BrowserContext* browser_context); | 79 BrowserContext* browser_context); |
| 79 | 80 |
| 81 // Returns the BlobContext for this context. |
| 82 static content::BlobContext* GetBlobContext(BrowserContext* browser_context); |
| 83 |
| 80 // Ensures that the corresponding ResourceContext is initialized. Normally the | 84 // Ensures that the corresponding ResourceContext is initialized. Normally the |
| 81 // BrowserContext initializs the corresponding getters when its objects are | 85 // BrowserContext initializs the corresponding getters when its objects are |
| 82 // created, but if the embedder wants to pass the ResourceContext to another | 86 // created, but if the embedder wants to pass the ResourceContext to another |
| 83 // thread before they use BrowserContext, they should call this to make sure | 87 // thread before they use BrowserContext, they should call this to make sure |
| 84 // that the ResourceContext is ready. | 88 // that the ResourceContext is ready. |
| 85 static void EnsureResourceContextInitialized(BrowserContext* browser_context); | 89 static void EnsureResourceContextInitialized(BrowserContext* browser_context); |
| 86 | 90 |
| 87 // Tells the HTML5 objects on this context to persist their session state | 91 // Tells the HTML5 objects on this context to persist their session state |
| 88 // across the next restart. | 92 // across the next restart. |
| 89 static void SaveSessionState(BrowserContext* browser_context); | 93 static void SaveSessionState(BrowserContext* browser_context); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 struct hash<content::BrowserContext*> { | 191 struct hash<content::BrowserContext*> { |
| 188 std::size_t operator()(content::BrowserContext* const& p) const { | 192 std::size_t operator()(content::BrowserContext* const& p) const { |
| 189 return reinterpret_cast<std::size_t>(p); | 193 return reinterpret_cast<std::size_t>(p); |
| 190 } | 194 } |
| 191 }; | 195 }; |
| 192 | 196 |
| 193 } // namespace BASE_HASH_NAMESPACE | 197 } // namespace BASE_HASH_NAMESPACE |
| 194 #endif | 198 #endif |
| 195 | 199 |
| 196 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 200 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
| OLD | NEW |