Chromium Code Reviews

Unified Diff: components/media_device_id_salt/media_device_id_salt.h

Issue 1981913002: *DRAFT* Move MediaDeviceIDSalt from chrome/ to components/ and use it in Android WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « components/media_device_id_salt/OWNERS ('k') | components/media_device_id_salt/media_device_id_salt.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/media_device_id_salt/media_device_id_salt.h
diff --git a/chrome/browser/media/media_device_id_salt.h b/components/media_device_id_salt/media_device_id_salt.h
similarity index 77%
rename from chrome/browser/media/media_device_id_salt.h
rename to components/media_device_id_salt/media_device_id_salt.h
index 5e1ec8fde31fe3150deceb44b95acb5d53480668..50374927fabc4d0ee80e5d34a46f531e93947d4a 100644
--- a/chrome/browser/media/media_device_id_salt.h
+++ b/components/media_device_id_salt/media_device_id_salt.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_MEDIA_MEDIA_DEVICE_ID_SALT_H_
-#define CHROME_BROWSER_MEDIA_MEDIA_DEVICE_ID_SALT_H_
+#ifndef COMPONENTS_MEDIA_DEVICE_ID_SALT_MEDIA_DEVICE_ID_SALT_H_
+#define COMPONENTS_MEDIA_DEVICE_ID_SALT_MEDIA_DEVICE_ID_SALT_H_
#include <string>
@@ -14,6 +14,15 @@
class PrefService;
+namespace media_device_id_salt {
+
+namespace prefs {
+
+// The salt used for creating random MediaSource IDs.
+extern const char kMediaDeviceIdSalt[];
+
+} // namespace prefs
+
// MediaDeviceIDSalt is responsible for creating and retrieving a salt string
// that is used for creating MediaSource IDs that can be cached by a web
// service. If the cache is cleared, the MediaSourceIds are invalidated.
@@ -42,4 +51,6 @@ class MediaDeviceIDSalt : public base::RefCountedThreadSafe<MediaDeviceIDSalt> {
DISALLOW_COPY_AND_ASSIGN(MediaDeviceIDSalt);
};
-#endif // CHROME_BROWSER_MEDIA_MEDIA_DEVICE_ID_SALT_H_
+} // namespace media_device_id_salt
+
+#endif // COMPONENTS_MEDIA_DEVICE_ID_SALT_MEDIA_DEVICE_ID_SALT_H_
« no previous file with comments | « components/media_device_id_salt/OWNERS ('k') | components/media_device_id_salt/media_device_id_salt.cc » ('j') | no next file with comments »

Powered by Google App Engine