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

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

Issue 143003031: Allow retrieval of media device ID salt even after ResourceContext has gone away. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add TODO about proper fix. Created 6 years, 10 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 | « chrome/browser/profiles/profile_io_data.h ('k') | content/browser/loader/resource_scheduler_unittest.cc » ('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 d6350eca92a8202446bfb8394f2a1e72e932a740..0c7f5aa3fcadc1c9d3c99a17cc40271c82e45e82 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -419,8 +419,7 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) {
local_state_pref_service);
quick_check_enabled_.MoveToThread(io_message_loop_proxy);
- media_device_id_salt_.reset(new MediaDeviceIDSalt(pref_service,
- is_incognito()));
+ media_device_id_salt_ = new MediaDeviceIDSalt(pref_service, is_incognito());
network_prediction_enabled_.Init(prefs::kNetworkPredictionEnabled,
pref_service);
@@ -730,8 +729,8 @@ HostContentSettingsMap* ProfileIOData::GetHostContentSettingsMap() const {
return host_content_settings_map_.get();
}
-std::string ProfileIOData::GetMediaDeviceIDSalt() const {
- return media_device_id_salt_->GetSalt();
+ResourceContext::SaltCallback ProfileIOData::GetMediaDeviceIDSalt() const {
+ return base::Bind(&MediaDeviceIDSalt::GetSalt, media_device_id_salt_);
}
void ProfileIOData::InitializeMetricsEnabledStateOnUIThread() {
@@ -876,7 +875,8 @@ bool ProfileIOData::ResourceContext::AllowContentAccess(
return setting == CONTENT_SETTING_ALLOW;
}
-std::string ProfileIOData::ResourceContext::GetMediaDeviceIDSalt() {
+ResourceContext::SaltCallback
+ProfileIOData::ResourceContext::GetMediaDeviceIDSalt() {
return io_data_->GetMediaDeviceIDSalt();
}
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | content/browser/loader/resource_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698