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

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

Issue 2820163002: Move MediaDeviceIDSalt from ProfileIOData to ProfileImpl. (Closed)
Patch Set: merge 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/resource_context_impl.cc ('k') | content/public/browser/resource_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/browser_context.h
diff --git a/content/public/browser/browser_context.h b/content/public/browser/browser_context.h
index 89461daa21f4788658306876b3e21fd79e7a810f..7bc69b65c45948ae16bb45fd0c21a5319d72e19d 100644
--- a/content/public/browser/browser_context.h
+++ b/content/public/browser/browser_context.h
@@ -10,6 +10,7 @@
#include <map>
#include <memory>
+#include <string>
#include <vector>
#include "base/callback_forward.h"
@@ -171,6 +172,8 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
static ServiceManagerConnection* GetServiceManagerConnectionFor(
BrowserContext* browser_context);
+ BrowserContext();
+
~BrowserContext() override;
// Shuts down the storage partitions associated to this browser context.
@@ -251,6 +254,18 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
// Registers per-browser-context services to be loaded in the browser process
// by the Service Manager.
virtual void RegisterInProcessServices(StaticServiceMap* services) {}
+
+ // Returns a random salt string that is used for creating media device IDs.
+ // Returns a random string by default.
+ virtual std::string GetMediaDeviceIDSalt();
+
+ // Utility function useful for embedders. Only needs to be called if
+ // 1) The embedder needs to use a new salt, and
+ // 2) The embedder saves its salt across restarts.
+ static std::string CreateRandomMediaDeviceIDSalt();
+
+ private:
+ const std::string media_device_id_salt_;
};
} // namespace content
« no previous file with comments | « content/browser/resource_context_impl.cc ('k') | content/public/browser/resource_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698