| 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" |
| 11 #include "base/supports_user_data.h" | 11 #include "base/supports_user_data.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "content/public/common/push_messaging_status.h" | 13 #include "content/public/common/push_messaging_status.h" |
| 14 | 14 |
| 15 class GURL; | 15 class GURL; |
| 16 | 16 |
| 17 namespace base { | 17 namespace base { |
| 18 class FilePath; | 18 class FilePath; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace fileapi { | 21 namespace storage { |
| 22 class ExternalMountPoints; | 22 class ExternalMountPoints; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace net { | 25 namespace net { |
| 26 class URLRequestContextGetter; | 26 class URLRequestContextGetter; |
| 27 } | 27 } |
| 28 | 28 |
| 29 namespace quota { | 29 namespace quota { |
| 30 class SpecialStoragePolicy; | 30 class SpecialStoragePolicy; |
| 31 } | 31 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 46 // This class holds the context needed for a browsing session. | 46 // This class holds the context needed for a browsing session. |
| 47 // It lives on the UI thread. All these methods must only be called on the UI | 47 // It lives on the UI thread. All these methods must only be called on the UI |
| 48 // thread. | 48 // thread. |
| 49 class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { | 49 class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { |
| 50 public: | 50 public: |
| 51 static DownloadManager* GetDownloadManager(BrowserContext* browser_context); | 51 static DownloadManager* GetDownloadManager(BrowserContext* browser_context); |
| 52 | 52 |
| 53 // Returns BrowserContext specific external mount points. It may return NULL | 53 // Returns BrowserContext specific external mount points. It may return NULL |
| 54 // if the context doesn't have any BrowserContext specific external mount | 54 // if the context doesn't have any BrowserContext specific external mount |
| 55 // points. Currenty, non-NULL value is returned only on ChromeOS. | 55 // points. Currenty, non-NULL value is returned only on ChromeOS. |
| 56 static fileapi::ExternalMountPoints* GetMountPoints(BrowserContext* context); | 56 static storage::ExternalMountPoints* GetMountPoints(BrowserContext* context); |
| 57 | 57 |
| 58 static content::StoragePartition* GetStoragePartition( | 58 static content::StoragePartition* GetStoragePartition( |
| 59 BrowserContext* browser_context, SiteInstance* site_instance); | 59 BrowserContext* browser_context, SiteInstance* site_instance); |
| 60 static content::StoragePartition* GetStoragePartitionForSite( | 60 static content::StoragePartition* GetStoragePartitionForSite( |
| 61 BrowserContext* browser_context, const GURL& site); | 61 BrowserContext* browser_context, const GURL& site); |
| 62 typedef base::Callback<void(StoragePartition*)> StoragePartitionCallback; | 62 typedef base::Callback<void(StoragePartition*)> StoragePartitionCallback; |
| 63 static void ForEachStoragePartition( | 63 static void ForEachStoragePartition( |
| 64 BrowserContext* browser_context, | 64 BrowserContext* browser_context, |
| 65 const StoragePartitionCallback& callback); | 65 const StoragePartitionCallback& callback); |
| 66 static void AsyncObliterateStoragePartition( | 66 static void AsyncObliterateStoragePartition( |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 struct hash<content::BrowserContext*> { | 175 struct hash<content::BrowserContext*> { |
| 176 std::size_t operator()(content::BrowserContext* const& p) const { | 176 std::size_t operator()(content::BrowserContext* const& p) const { |
| 177 return reinterpret_cast<std::size_t>(p); | 177 return reinterpret_cast<std::size_t>(p); |
| 178 } | 178 } |
| 179 }; | 179 }; |
| 180 | 180 |
| 181 } // namespace BASE_HASH_NAMESPACE | 181 } // namespace BASE_HASH_NAMESPACE |
| 182 #endif | 182 #endif |
| 183 | 183 |
| 184 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 184 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
| OLD | NEW |