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 ff66f912d7aed54c85d0a58c95ec2ff1d91e956b..64c0491627d1165f3e0f1eaf3fd87f9589efa237 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)); |
@@ -945,6 +958,7 @@ void ProfileIOData::ShutdownOnUIThread() { |
printing_enabled_.Destroy(); |
sync_disabled_.Destroy(); |
signin_allowed_.Destroy(); |
+ media_device_id_salt_.reset(NULL); |
Jói
2013/11/04 16:53:29
I'm not sure this is correct (destroying it on the
perkj_chrome
2013/11/04 19:05:38
This is as the same as the other objects and ensur
Jói
2013/11/04 19:24:15
I see now from the ProfileIOData documentation tha
willchan no longer on Chromium
2013/11/04 19:33:00
Sorry, I missed this. Just to doublecheck, what th
|
session_startup_pref_.Destroy(); |
#if defined(ENABLE_CONFIGURATION_POLICY) |
if (url_blacklist_manager_) |