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

Unified Diff: chrome/browser/profiles/profile_io_data.cc

Issue 54863002: Implement a salt for MediaSource IDs that can be cleared by a user. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed jois nit. Created 7 years 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 | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_io_data.cc
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index 7bb27157d14da3bc1f3126d1b1e2eb1ed9c7751d..502807dc49c66cb77a02d4b749675805431ca5df 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -34,6 +34,7 @@
#include "chrome/browser/extensions/extension_resource_protocols.h"
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/io_thread.h"
+#include "chrome/browser/media/media_device_id_salt.h"
#include "chrome/browser/net/about_protocol_handler.h"
#include "chrome/browser/net/chrome_cookie_notification_details.h"
#include "chrome/browser/net/chrome_fraudulent_certificate_reporter.h"
@@ -293,6 +294,7 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) {
printing_enabled_.Init(prefs::kPrintingEnabled, pref_service);
printing_enabled_.MoveToThread(io_message_loop_proxy);
#endif
+
chrome_http_user_agent_settings_.reset(
new ChromeHttpUserAgentSettings(pref_service));
@@ -324,6 +326,9 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) {
signin_allowed_.MoveToThread(io_message_loop_proxy);
}
+ media_device_id_salt_.reset(new MediaDeviceIDSalt(pref_service,
+ is_incognito()));
+
#if defined(OS_CHROMEOS)
cert_verifier_ = policy::PolicyCertServiceFactory::CreateForProfile(profile);
#endif
@@ -613,6 +618,10 @@ HostContentSettingsMap* ProfileIOData::GetHostContentSettingsMap() const {
return host_content_settings_map_.get();
}
+std::string ProfileIOData::GetMediaDeviceIDSalt() const {
+ return media_device_id_salt_->GetSalt();
+}
+
void ProfileIOData::InitializeMetricsEnabledStateOnUIThread() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
#if defined(OS_CHROMEOS)
@@ -715,6 +724,10 @@ bool ProfileIOData::ResourceContext::AllowContentAccess(
return setting == CONTENT_SETTING_ALLOW;
}
+std::string ProfileIOData::ResourceContext::GetMediaDeviceIDSalt() {
+ return io_data_->GetMediaDeviceIDSalt();
+}
+
// static
std::string ProfileIOData::GetSSLSessionCacheShard() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
@@ -923,6 +936,8 @@ void ProfileIOData::ShutdownOnUIThread() {
printing_enabled_.Destroy();
sync_disabled_.Destroy();
signin_allowed_.Destroy();
+ if (media_device_id_salt_)
+ media_device_id_salt_->ShutdownOnUIThread();
session_startup_pref_.Destroy();
#if defined(ENABLE_CONFIGURATION_POLICY)
if (url_blacklist_manager_)
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698