OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // MediaDeviceIDSalt is responsible for creating and retrieving a salt string | |
Jói
2013/11/01 16:30:31
Would move this to be right above the class defini
perkj_chrome
2013/11/01 19:01:56
Done.
| |
6 // that is used for creating MediaSource IDs that can be cached by a web | |
7 // service. If the cache is cleared, the MediaSourceIds are invalidated. | |
8 | |
9 #ifndef CHROME_BROWSER_MEDIA_MEDIA_DEVICE_ID_SALT_H_ | |
10 #define CHROME_BROWSER_MEDIA_MEDIA_DEVICE_ID_SALT_H_ | |
11 | |
12 #include <string> | |
13 | |
14 #include "base/prefs/pref_member.h" | |
15 #include "components/user_prefs/pref_registry_syncable.h" | |
16 | |
17 class PrefService; | |
18 | |
19 class MediaDeviceIDSalt { | |
20 public: | |
21 MediaDeviceIDSalt(PrefService* pref_service, | |
22 bool incognito); | |
23 ~MediaDeviceIDSalt(); | |
24 | |
25 std::string GetSalt() const; | |
26 | |
27 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | |
28 static void Reset(PrefService* pref_service); | |
29 | |
30 private: | |
31 // |incognito_salt_| is initialized in ctor on UI thread but only read | |
32 // on the IO thread. | |
33 std::string incognito_salt_; | |
34 mutable StringPrefMember media_device_id_salt_; | |
35 }; | |
36 | |
37 #endif // CHROME_BROWSER_MEDIA_MEDIA_DEVICE_ID_SALT_H_ | |
OLD | NEW |