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

Unified Diff: chrome/browser/media/media_device_id_salt.cc

Issue 2820163002: Move MediaDeviceIDSalt from ProfileIOData to ProfileImpl. (Closed)
Patch Set: merge Created 3 years, 8 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/media/media_device_id_salt.h ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/media_device_id_salt.cc
diff --git a/chrome/browser/media/media_device_id_salt.cc b/chrome/browser/media/media_device_id_salt.cc
index f8fcfcf4e294fde8338ae4809d946a449becdcaf..a8702e208cf68abe4b345bc16fad048a4d13ab87 100644
--- a/chrome/browser/media/media_device_id_salt.cc
+++ b/chrome/browser/media/media_device_id_salt.cc
@@ -8,8 +8,8 @@
#include "chrome/browser/profiles/profile_io_data.h"
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_service.h"
+#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
-#include "content/public/browser/resource_context.h"
using content::BrowserThread;
@@ -19,18 +19,13 @@ MediaDeviceIDSalt::MediaDeviceIDSalt(PrefService* pref_service) {
media_device_id_salt_.Init(prefs::kMediaDeviceIdSalt, pref_service);
if (media_device_id_salt_.GetValue().empty()) {
media_device_id_salt_.SetValue(
- content::ResourceContext::CreateRandomMediaDeviceIDSalt());
+ content::BrowserContext::CreateRandomMediaDeviceIDSalt());
}
}
MediaDeviceIDSalt::~MediaDeviceIDSalt() {
}
-void MediaDeviceIDSalt::ShutdownOnUIThread() {
- DCHECK_CURRENTLY_ON(BrowserThread::UI);
- media_device_id_salt_.Destroy();
-}
-
std::string MediaDeviceIDSalt::GetSalt() const {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
return media_device_id_salt_.GetValue();
@@ -44,5 +39,5 @@ void MediaDeviceIDSalt::RegisterProfilePrefs(
void MediaDeviceIDSalt::Reset(PrefService* pref_service) {
pref_service->SetString(
prefs::kMediaDeviceIdSalt,
- content::ResourceContext::CreateRandomMediaDeviceIDSalt());
+ content::BrowserContext::CreateRandomMediaDeviceIDSalt());
}
« no previous file with comments | « chrome/browser/media/media_device_id_salt.h ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698