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

Unified Diff: content/public/browser/browser_context.h

Issue 10535026: Move creation and ownership of DownloadManager from the embedder to content. This matches all the o… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros compile Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/public/browser/browser_context.h
===================================================================
--- content/public/browser/browser_context.h (revision 140592)
+++ content/public/browser/browser_context.h (working copy)
@@ -37,6 +37,7 @@
class DOMStorageContext;
class DownloadManager;
+class DownloadManagerDelegate;
class GeolocationPermissionContext;
class IndexedDBContext;
class ResourceContext;
@@ -46,6 +47,7 @@
// It lives on the UI thread.
class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
public:
+ static DownloadManager* GetDownloadManager(BrowserContext* browser_context);
static quota::QuotaManager* GetQuotaManager(BrowserContext* browser_context);
static DOMStorageContext* GetDOMStorageContext(
BrowserContext* browser_context);
@@ -80,9 +82,6 @@
// This doesn't belong here; http://crbug.com/89628
virtual bool IsOffTheRecord() const = 0;
- // Returns the DownloadManager associated with this context.
- virtual content::DownloadManager* GetDownloadManager() = 0;
-
// Returns the request context information associated with this context. Call
// this only on the UI thread, since it can send notifications that should
// happen on the UI thread.
@@ -104,6 +103,10 @@
// Returns the resource context.
virtual ResourceContext* GetResourceContext() = 0;
+ // Returns the DownloadManagerDelegate for this context. This will be called
+ // once per context. It's valid to return NULL.
+ virtual DownloadManagerDelegate* GetDownloadManagerDelegate() = 0;
Randy Smith (Not in Mondays) 2012/06/06 15:51:59 What's the conceptual reason for not having the Do
jam 2012/06/06 16:06:15 The reason is that BrowserContext is an interface
Randy Smith (Not in Mondays) 2012/06/06 16:34:45 Makes sense; thanks for the explanation.
+
// Returns the geolocation permission context for this context.
virtual GeolocationPermissionContext* GetGeolocationPermissionContext() = 0;

Powered by Google App Engine
This is Rietveld 408576698