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 f973d9fa71427b0740c6bff1dd2a50276321cb28..59b3d4d48cbbd2b9bdf8383dbccfb396f713b112 100644 |
--- a/chrome/browser/profiles/profile_io_data.cc |
+++ b/chrome/browser/profiles/profile_io_data.cc |
@@ -35,6 +35,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" |
@@ -315,6 +316,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)); |
@@ -346,6 +348,9 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) { |
signin_allowed_.MoveToThread(io_message_loop_proxy); |
} |
+ media_device_id_salt_.reset(new MediaDeviceIDSalt(pref_service, |
+ is_incognito())); |
+ |
// The URLBlacklistManager has to be created on the UI thread to register |
// observers of |pref_service|, and it also has to clean up on |
// ShutdownOnUIThread to release these observers on the right thread. |
@@ -645,6 +650,10 @@ DesktopNotificationService* ProfileIOData::GetNotificationService() const { |
} |
#endif |
+std::string ProfileIOData::GetMediaDeviceIDSalt() const { |
+ return media_device_id_salt_->GetSalt(); |
+} |
+ |
void ProfileIOData::InitializeMetricsEnabledStateOnUIThread() { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
#if defined(OS_CHROMEOS) |
@@ -741,6 +750,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)); |
@@ -946,6 +959,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_) |