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

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 merge issues 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
« no previous file with comments | « no previous file | chrome/browser/signin/easy_unlock_service_regular.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 247 }
248 248
249 // static 249 // static
250 void EasyUnlockService::RegisterProfilePrefs( 250 void EasyUnlockService::RegisterProfilePrefs(
251 user_prefs::PrefRegistrySyncable* registry) { 251 user_prefs::PrefRegistrySyncable* registry) {
252 registry->RegisterBooleanPref(prefs::kEasyUnlockAllowed, true); 252 registry->RegisterBooleanPref(prefs::kEasyUnlockAllowed, true);
253 registry->RegisterBooleanPref(prefs::kEasyUnlockEnabled, false); 253 registry->RegisterBooleanPref(prefs::kEasyUnlockEnabled, false);
254 registry->RegisterDictionaryPref(prefs::kEasyUnlockPairing, 254 registry->RegisterDictionaryPref(prefs::kEasyUnlockPairing,
255 base::MakeUnique<base::DictionaryValue>()); 255 base::MakeUnique<base::DictionaryValue>());
256 256
257 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 257 proximity_auth::ProximityAuthPrefManager::RegisterPrefs(registry);
258 proximity_auth::switches::kEnableBluetoothLowEnergyDiscovery))
259 proximity_auth::ProximityAuthPrefManager::RegisterPrefs(registry);
260 } 258 }
261 259
262 // static 260 // static
263 void EasyUnlockService::RegisterPrefs(PrefRegistrySimple* registry) { 261 void EasyUnlockService::RegisterPrefs(PrefRegistrySimple* registry) {
264 registry->RegisterStringPref(prefs::kEasyUnlockDeviceId, std::string()); 262 registry->RegisterStringPref(prefs::kEasyUnlockDeviceId, std::string());
265 registry->RegisterDictionaryPref(prefs::kEasyUnlockHardlockState); 263 registry->RegisterDictionaryPref(prefs::kEasyUnlockHardlockState);
266 registry->RegisterDictionaryPref(prefs::kEasyUnlockLocalStateUserPrefs); 264 registry->RegisterDictionaryPref(prefs::kEasyUnlockLocalStateUserPrefs);
267 #if defined(OS_CHROMEOS) 265 #if defined(OS_CHROMEOS)
268 EasyUnlockTpmKeyManager::RegisterLocalStatePrefs(registry); 266 EasyUnlockTpmKeyManager::RegisterLocalStatePrefs(registry);
269 #endif 267 #endif
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 877
880 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt 878 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt
881 // failed. 879 // failed.
882 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_) 880 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_)
883 ->PrepareTpmKey(true /* check_private_key */, 881 ->PrepareTpmKey(true /* check_private_key */,
884 base::Closure()); 882 base::Closure());
885 #endif // defined(OS_CHROMEOS) 883 #endif // defined(OS_CHROMEOS)
886 884
887 tpm_key_checked_ = true; 885 tpm_key_checked_ = true;
888 } 886 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/signin/easy_unlock_service_regular.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698