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

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

Issue 1741953002: mojo: Sketch a profile application. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the DownloadManagerImplTests. Created 4 years, 10 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
diff --git a/content/public/browser/browser_context.h b/content/public/browser/browser_context.h
index b524b176daf208f32a3fe169c05d18ba38258552..70335fe7c6a1ab8c3e036724f703fbf5c7c1205f 100644
--- a/content/public/browser/browser_context.h
+++ b/content/public/browser/browser_context.h
@@ -128,6 +128,16 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
static void SetDownloadManagerForTesting(BrowserContext* browser_context,
DownloadManager* download_manager);
+ // Makes mojo aware of this BrowserContext, and assigns a user ID number to
+ // it. Should be called for each BrowserContext created.
+ static void Initialize(BrowserContext* browser_context,
Ben Goodger (Google) 2016/03/01 21:56:06 is there a reason why these methods tend to be sta
jam 2016/03/02 17:50:37 that's the (admittedly awkward) pattern used here.
+ const base::FilePath& path);
+
+ // Returns a randomized user ID number associated with this
+ // BrowserContext. This ID is not persistent across runs.
+ static uint32_t GetMojoUserIdFor(BrowserContext* browser_context);
+
+ BrowserContext();
~BrowserContext() override;
// Creates a delegate to initialize a HostZoomMap and persist its information.
@@ -198,6 +208,11 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
// Returns the BackgroundSyncController associated with that context if any,
// nullptr otherwise.
virtual BackgroundSyncController* GetBackgroundSyncController() = 0;
+
+ private:
+ bool initialize_called_;
+
+ DISALLOW_COPY_AND_ASSIGN(BrowserContext);
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698