Index: components/media_device_id_salt/media_device_id_salt.cc |
diff --git a/chrome/browser/media/media_device_id_salt.cc b/components/media_device_id_salt/media_device_id_salt.cc |
similarity index 82% |
rename from chrome/browser/media/media_device_id_salt.cc |
rename to components/media_device_id_salt/media_device_id_salt.cc |
index 2220418e031c0f21a713d886d5eacaaa2903f2f9..0c6e7ab9d14b43aa8fcf55ea297314ee484371c0 100644 |
--- a/chrome/browser/media/media_device_id_salt.cc |
+++ b/components/media_device_id_salt/media_device_id_salt.cc |
@@ -1,17 +1,23 @@ |
// Copyright 2013 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/browser/media/media_device_id_salt.h" |
+#include "components/media_device_id_salt/media_device_id_salt.h" |
#include "base/base64.h" |
#include "base/rand_util.h" |
-#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_thread.h" |
using content::BrowserThread; |
+namespace media_device_id_salt { |
+ |
+namespace prefs { |
+ |
+const char kMediaDeviceIdSalt[] = "media.device_id_salt"; |
+ |
+} // namespace prefs |
+ |
namespace { |
std::string CreateSalt() { |
@@ -40,8 +46,7 @@ MediaDeviceIDSalt::MediaDeviceIDSalt(PrefService* pref_service, |
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
} |
-MediaDeviceIDSalt::~MediaDeviceIDSalt() { |
-} |
+MediaDeviceIDSalt::~MediaDeviceIDSalt() {} |
void MediaDeviceIDSalt::ShutdownOnUIThread() { |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
@@ -62,6 +67,7 @@ void MediaDeviceIDSalt::RegisterProfilePrefs( |
} |
void MediaDeviceIDSalt::Reset(PrefService* pref_service) { |
- pref_service->SetString(prefs::kMediaDeviceIdSalt, |
- CreateSalt()); |
+ pref_service->SetString(prefs::kMediaDeviceIdSalt, CreateSalt()); |
} |
+ |
+} // namespace media_device_id_salt |