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

Side by Side Diff: chrome/browser/signin/easy_unlock_service.cc

Issue 2973243002: Adding pref to store the user-selected proximity threshold. (Closed)
Patch Set: Fixing browser tests Created 3 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 4
5 #include "chrome/browser/signin/easy_unlock_service.h" 5 #include "chrome/browser/signin/easy_unlock_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "apps/app_lifetime_monitor.h" 9 #include "apps/app_lifetime_monitor.h"
10 #include "apps/app_lifetime_monitor_factory.h" 10 #include "apps/app_lifetime_monitor_factory.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 user_prefs::PrefRegistrySyncable* registry) { 257 user_prefs::PrefRegistrySyncable* registry) {
258 registry->RegisterBooleanPref(prefs::kEasyUnlockAllowed, true); 258 registry->RegisterBooleanPref(prefs::kEasyUnlockAllowed, true);
259 registry->RegisterBooleanPref(prefs::kEasyUnlockEnabled, false); 259 registry->RegisterBooleanPref(prefs::kEasyUnlockEnabled, false);
260 registry->RegisterDictionaryPref(prefs::kEasyUnlockPairing, 260 registry->RegisterDictionaryPref(prefs::kEasyUnlockPairing,
261 base::MakeUnique<base::DictionaryValue>()); 261 base::MakeUnique<base::DictionaryValue>());
262 registry->RegisterBooleanPref( 262 registry->RegisterBooleanPref(
263 prefs::kEasyUnlockProximityRequired, 263 prefs::kEasyUnlockProximityRequired,
264 false, 264 false,
265 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 265 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
266 266
267 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 267 proximity_auth::ProximityAuthPrefManager::RegisterPrefs(registry);
268 proximity_auth::switches::kEnableBluetoothLowEnergyDiscovery))
269 proximity_auth::ProximityAuthPrefManager::RegisterPrefs(registry);
270 } 268 }
271 269
272 // static 270 // static
273 void EasyUnlockService::RegisterPrefs(PrefRegistrySimple* registry) { 271 void EasyUnlockService::RegisterPrefs(PrefRegistrySimple* registry) {
274 registry->RegisterStringPref(prefs::kEasyUnlockDeviceId, std::string()); 272 registry->RegisterStringPref(prefs::kEasyUnlockDeviceId, std::string());
275 registry->RegisterDictionaryPref(prefs::kEasyUnlockHardlockState); 273 registry->RegisterDictionaryPref(prefs::kEasyUnlockHardlockState);
276 registry->RegisterDictionaryPref(prefs::kEasyUnlockLocalStateUserPrefs); 274 registry->RegisterDictionaryPref(prefs::kEasyUnlockLocalStateUserPrefs);
277 #if defined(OS_CHROMEOS) 275 #if defined(OS_CHROMEOS)
278 EasyUnlockTpmKeyManager::RegisterLocalStatePrefs(registry); 276 EasyUnlockTpmKeyManager::RegisterLocalStatePrefs(registry);
279 #endif 277 #endif
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 911
914 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt 912 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt
915 // failed. 913 // failed.
916 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_) 914 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_)
917 ->PrepareTpmKey(true /* check_private_key */, 915 ->PrepareTpmKey(true /* check_private_key */,
918 base::Closure()); 916 base::Closure());
919 #endif // defined(OS_CHROMEOS) 917 #endif // defined(OS_CHROMEOS)
920 918
921 tpm_key_checked_ = true; 919 tpm_key_checked_ = true;
922 } 920 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698