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

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

Issue 2065383003: Revert of Make default media device ID salts random by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: 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 5c4d65b1023f40e7bba584af83843c3758522b34..ba4ecf650be61d8126b7f6174e5fe9b0e73a22c7 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -499,8 +499,7 @@
signin_allowed_.MoveToThread(io_task_runner);
}
- if (!IsOffTheRecord())
- media_device_id_salt_ = new MediaDeviceIDSalt(pref_service);
+ media_device_id_salt_ = new MediaDeviceIDSalt(pref_service, IsOffTheRecord());
network_prediction_options_.Init(prefs::kNetworkPredictionOptions,
pref_service);
@@ -866,9 +865,8 @@
return host_content_settings_map_.get();
}
-std::string ProfileIOData::GetMediaDeviceIDSalt() const {
- DCHECK(media_device_id_salt_);
- return media_device_id_salt_->GetSalt();
+ResourceContext::SaltCallback ProfileIOData::GetMediaDeviceIDSalt() const {
+ return base::Bind(&MediaDeviceIDSalt::GetSalt, media_device_id_salt_);
}
bool ProfileIOData::IsOffTheRecord() const {
@@ -1005,11 +1003,9 @@
#endif
}
-std::string ProfileIOData::ResourceContext::GetMediaDeviceIDSalt() {
- if (io_data_->HasMediaDeviceIDSalt())
- return io_data_->GetMediaDeviceIDSalt();
-
- return content::ResourceContext::GetMediaDeviceIDSalt();
+ResourceContext::SaltCallback
+ProfileIOData::ResourceContext::GetMediaDeviceIDSalt() {
+ return io_data_->GetMediaDeviceIDSalt();
}
void ProfileIOData::Init(
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | content/browser/renderer_host/media/audio_renderer_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698