Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: content/public/browser/browser_context.h

Issue 492873002: Collapse fileapi, webkit_blob, webkit_database, quota, and webkit_common namespaces into single sto… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos build Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 storage {
30 class SpecialStoragePolicy; 30 class SpecialStoragePolicy;
31 } 31 }
32 32
33 namespace content { 33 namespace content {
34 34
35 class BlobHandle; 35 class BlobHandle;
36 class BrowserPluginGuestManager; 36 class BrowserPluginGuestManager;
37 class DownloadManager; 37 class DownloadManager;
38 class DownloadManagerDelegate; 38 class DownloadManagerDelegate;
39 class IndexedDBContext; 39 class IndexedDBContext;
40 class PushMessagingService; 40 class PushMessagingService;
41 class ResourceContext; 41 class ResourceContext;
42 class SiteInstance; 42 class SiteInstance;
43 class StoragePartition; 43 class StoragePartition;
44 class SSLHostStateDelegate; 44 class SSLHostStateDelegate;
45 45
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 // Returns the DownloadManagerDelegate for this context. This will be called 148 // Returns the DownloadManagerDelegate for this context. This will be called
149 // once per context. The embedder owns the delegate and is responsible for 149 // once per context. The embedder owns the delegate and is responsible for
150 // ensuring that it outlives DownloadManager. It's valid to return NULL. 150 // ensuring that it outlives DownloadManager. It's valid to return NULL.
151 virtual DownloadManagerDelegate* GetDownloadManagerDelegate() = 0; 151 virtual DownloadManagerDelegate* GetDownloadManagerDelegate() = 0;
152 152
153 // Returns the guest manager for this context. 153 // Returns the guest manager for this context.
154 virtual BrowserPluginGuestManager* GetGuestManager() = 0; 154 virtual BrowserPluginGuestManager* GetGuestManager() = 0;
155 155
156 // Returns a special storage policy implementation, or NULL. 156 // Returns a special storage policy implementation, or NULL.
157 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() = 0; 157 virtual storage::SpecialStoragePolicy* GetSpecialStoragePolicy() = 0;
158 158
159 // Returns a push messaging service. The embedder owns the service, and is 159 // Returns a push messaging service. The embedder owns the service, and is
160 // responsible for ensuring that it outlives RenderProcessHost. It's valid to 160 // responsible for ensuring that it outlives RenderProcessHost. It's valid to
161 // return NULL. 161 // return NULL.
162 virtual PushMessagingService* GetPushMessagingService() = 0; 162 virtual PushMessagingService* GetPushMessagingService() = 0;
163 163
164 // Returns the SSL host state decisions for this context. The context may 164 // Returns the SSL host state decisions for this context. The context may
165 // return NULL, implementing the default exception storage strategy. 165 // return NULL, implementing the default exception storage strategy.
166 virtual SSLHostStateDelegate* GetSSLHostStateDelegate() = 0; 166 virtual SSLHostStateDelegate* GetSSLHostStateDelegate() = 0;
167 }; 167 };
168 168
169 } // namespace content 169 } // namespace content
170 170
171 #if defined(COMPILER_GCC) 171 #if defined(COMPILER_GCC)
172 namespace BASE_HASH_NAMESPACE { 172 namespace BASE_HASH_NAMESPACE {
173 173
174 template<> 174 template<>
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_
OLDNEW
« no previous file with comments | « content/common/shareable_file_reference_unittest.cc ('k') | content/public/browser/child_process_security_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698