| 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 29 matching lines...) Expand all Loading... |
| 40 // It lives on the UI thread. All these methods must only be called on the UI | 40 // It lives on the UI thread. All these methods must only be called on the UI |
| 41 // thread. | 41 // thread. |
| 42 class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { | 42 class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { |
| 43 public: | 43 public: |
| 44 // Used in ForEachStoragePartition(). The first argument is the partition id. | 44 // Used in ForEachStoragePartition(). The first argument is the partition id. |
| 45 // The second argument is the StoragePartition object for that partition id. | 45 // The second argument is the StoragePartition object for that partition id. |
| 46 typedef base::Callback<void(const std::string&, StoragePartition*)> | 46 typedef base::Callback<void(const std::string&, StoragePartition*)> |
| 47 StoragePartitionCallback; | 47 StoragePartitionCallback; |
| 48 | 48 |
| 49 static DownloadManager* GetDownloadManager(BrowserContext* browser_context); | 49 static DownloadManager* GetDownloadManager(BrowserContext* browser_context); |
| 50 static IndexedDBContext* GetIndexedDBContext(BrowserContext* browser_context); | |
| 51 static fileapi::FileSystemContext* GetFileSystemContext( | 50 static fileapi::FileSystemContext* GetFileSystemContext( |
| 52 BrowserContext* browser_context); | 51 BrowserContext* browser_context); |
| 53 | 52 |
| 54 static content::StoragePartition* GetStoragePartition( | 53 static content::StoragePartition* GetStoragePartition( |
| 55 BrowserContext* browser_context, SiteInstance* site_instance); | 54 BrowserContext* browser_context, SiteInstance* site_instance); |
| 56 static content::StoragePartition* GetStoragePartitionForSite( | 55 static content::StoragePartition* GetStoragePartitionForSite( |
| 57 BrowserContext* browser_context, const GURL& site); | 56 BrowserContext* browser_context, const GURL& site); |
| 58 static void ForEachStoragePartition( | 57 static void ForEachStoragePartition( |
| 59 BrowserContext* browser_context, | 58 BrowserContext* browser_context, |
| 60 const StoragePartitionCallback& callback); | 59 const StoragePartitionCallback& callback); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 struct hash<content::BrowserContext*> { | 146 struct hash<content::BrowserContext*> { |
| 148 std::size_t operator()(content::BrowserContext* const& p) const { | 147 std::size_t operator()(content::BrowserContext* const& p) const { |
| 149 return reinterpret_cast<std::size_t>(p); | 148 return reinterpret_cast<std::size_t>(p); |
| 150 } | 149 } |
| 151 }; | 150 }; |
| 152 | 151 |
| 153 } // namespace BASE_HASH_NAMESPACE | 152 } // namespace BASE_HASH_NAMESPACE |
| 154 #endif | 153 #endif |
| 155 | 154 |
| 156 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 155 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
| OLD | NEW |