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

Side by Side Diff: chrome/browser/media/media_device_id_salt.cc

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 #include "chrome/browser/media/media_device_id_salt.h" 4 #include "chrome/browser/media/media_device_id_salt.h"
5 5
6 #include "base/base64.h" 6 #include "base/base64.h"
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/rand_util.h" 8 #include "base/rand_util.h"
9 #include "chrome/browser/profiles/profile_io_data.h" 9 #include "chrome/browser/profiles/profile_io_data.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 std::string MediaDeviceIDSalt::GetSalt() const { 52 std::string MediaDeviceIDSalt::GetSalt() const {
53 DCHECK_CURRENTLY_ON(BrowserThread::IO); 53 DCHECK_CURRENTLY_ON(BrowserThread::IO);
54 if (incognito_salt_.size()) 54 if (incognito_salt_.size())
55 return incognito_salt_; 55 return incognito_salt_;
56 return media_device_id_salt_.GetValue(); 56 return media_device_id_salt_.GetValue();
57 } 57 }
58 58
59 void MediaDeviceIDSalt::RegisterProfilePrefs( 59 void MediaDeviceIDSalt::RegisterProfilePrefs(
60 user_prefs::PrefRegistrySyncable* registry) { 60 user_prefs::PrefRegistrySyncable* registry) {
61 registry->RegisterStringPref( 61 registry->RegisterStringPref(prefs::kMediaDeviceIdSalt, std::string());
62 prefs::kMediaDeviceIdSalt,
63 std::string(),
64 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
65 } 62 }
66 63
67 void MediaDeviceIDSalt::Reset(PrefService* pref_service) { 64 void MediaDeviceIDSalt::Reset(PrefService* pref_service) {
68 pref_service->SetString(prefs::kMediaDeviceIdSalt, 65 pref_service->SetString(prefs::kMediaDeviceIdSalt,
69 CreateSalt()); 66 CreateSalt());
70 } 67 }
OLDNEW
« no previous file with comments | « chrome/browser/media/media_capture_devices_dispatcher.cc ('k') | chrome/browser/media/media_stream_devices_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698