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

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

Issue 2827523003: Move BrowsingDataRemover to content/ (Closed)
Patch Set: Addressed some comments. Created 3 years, 8 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
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 namespace storage { 46 namespace storage {
47 class SpecialStoragePolicy; 47 class SpecialStoragePolicy;
48 } 48 }
49 49
50 namespace content { 50 namespace content {
51 51
52 class BackgroundSyncController; 52 class BackgroundSyncController;
53 class BlobHandle; 53 class BlobHandle;
54 class BrowserPluginGuestManager; 54 class BrowserPluginGuestManager;
55 class BrowsingDataRemover;
56 class BrowsingDataRemoverDelegate;
55 class DownloadManager; 57 class DownloadManager;
56 class DownloadManagerDelegate; 58 class DownloadManagerDelegate;
57 class PermissionManager; 59 class PermissionManager;
58 class PushMessagingService; 60 class PushMessagingService;
59 class ResourceContext; 61 class ResourceContext;
60 class ServiceManagerConnection; 62 class ServiceManagerConnection;
61 class SiteInstance; 63 class SiteInstance;
62 class StoragePartition; 64 class StoragePartition;
63 class SSLHostStateDelegate; 65 class SSLHostStateDelegate;
64 66
(...skipping 12 matching lines...) Expand all
77 // thread. 79 // thread.
78 class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { 80 class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
79 public: 81 public:
80 static DownloadManager* GetDownloadManager(BrowserContext* browser_context); 82 static DownloadManager* GetDownloadManager(BrowserContext* browser_context);
81 83
82 // Returns BrowserContext specific external mount points. It may return 84 // Returns BrowserContext specific external mount points. It may return
83 // nullptr if the context doesn't have any BrowserContext specific external 85 // nullptr if the context doesn't have any BrowserContext specific external
84 // mount points. Currenty, non-nullptr value is returned only on ChromeOS. 86 // mount points. Currenty, non-nullptr value is returned only on ChromeOS.
85 static storage::ExternalMountPoints* GetMountPoints(BrowserContext* context); 87 static storage::ExternalMountPoints* GetMountPoints(BrowserContext* context);
86 88
89 // Returns a BrowsingDataRemover that can schedule data deletion tasks
90 // for this |context|.
91 static content::BrowsingDataRemover* GetBrowsingDataRemover(
jam 2017/04/21 22:58:31 nit: no content::
msramek 2017/04/25 01:29:10 Done. Here and in the old code below.
92 BrowserContext* context);
93
87 static content::StoragePartition* GetStoragePartition( 94 static content::StoragePartition* GetStoragePartition(
88 BrowserContext* browser_context, SiteInstance* site_instance); 95 BrowserContext* browser_context, SiteInstance* site_instance);
89 static content::StoragePartition* GetStoragePartitionForSite( 96 static content::StoragePartition* GetStoragePartitionForSite(
90 BrowserContext* browser_context, const GURL& site); 97 BrowserContext* browser_context, const GURL& site);
91 using StoragePartitionCallback = base::Callback<void(StoragePartition*)>; 98 using StoragePartitionCallback = base::Callback<void(StoragePartition*)>;
92 static void ForEachStoragePartition( 99 static void ForEachStoragePartition(
93 BrowserContext* browser_context, 100 BrowserContext* browser_context,
94 const StoragePartitionCallback& callback); 101 const StoragePartitionCallback& callback);
95 static void AsyncObliterateStoragePartition( 102 static void AsyncObliterateStoragePartition(
96 BrowserContext* browser_context, 103 BrowserContext* browser_context,
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 virtual SSLHostStateDelegate* GetSSLHostStateDelegate() = 0; 222 virtual SSLHostStateDelegate* GetSSLHostStateDelegate() = 0;
216 223
217 // Returns the PermissionManager associated with that context if any, nullptr 224 // Returns the PermissionManager associated with that context if any, nullptr
218 // otherwise. 225 // otherwise.
219 virtual PermissionManager* GetPermissionManager() = 0; 226 virtual PermissionManager* GetPermissionManager() = 0;
220 227
221 // Returns the BackgroundSyncController associated with that context if any, 228 // Returns the BackgroundSyncController associated with that context if any,
222 // nullptr otherwise. 229 // nullptr otherwise.
223 virtual BackgroundSyncController* GetBackgroundSyncController() = 0; 230 virtual BackgroundSyncController* GetBackgroundSyncController() = 0;
224 231
232 // Returns the BrowsingDataRemoverDelegate for this context. This will be
233 // called once per context. It's valid to return nullptr.
234 virtual BrowsingDataRemoverDelegate* GetBrowsingDataRemoverDelegate();
235
225 // Creates the main net::URLRequestContextGetter. It's called only once. 236 // Creates the main net::URLRequestContextGetter. It's called only once.
226 virtual net::URLRequestContextGetter* CreateRequestContext( 237 virtual net::URLRequestContextGetter* CreateRequestContext(
227 ProtocolHandlerMap* protocol_handlers, 238 ProtocolHandlerMap* protocol_handlers,
228 URLRequestInterceptorScopedVector request_interceptors) = 0; 239 URLRequestInterceptorScopedVector request_interceptors) = 0;
229 240
230 // Creates the net::URLRequestContextGetter for a StoragePartition. It's 241 // Creates the net::URLRequestContextGetter for a StoragePartition. It's
231 // called only once per partition_path. 242 // called only once per partition_path.
232 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( 243 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
233 const base::FilePath& partition_path, 244 const base::FilePath& partition_path,
234 bool in_memory, 245 bool in_memory,
(...skipping 14 matching lines...) Expand all
249 using StaticServiceMap = std::map<std::string, ServiceInfo>; 260 using StaticServiceMap = std::map<std::string, ServiceInfo>;
250 261
251 // Registers per-browser-context services to be loaded in the browser process 262 // Registers per-browser-context services to be loaded in the browser process
252 // by the Service Manager. 263 // by the Service Manager.
253 virtual void RegisterInProcessServices(StaticServiceMap* services) {} 264 virtual void RegisterInProcessServices(StaticServiceMap* services) {}
254 }; 265 };
255 266
256 } // namespace content 267 } // namespace content
257 268
258 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ 269 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698