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

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

Issue 2784513002: Move PrefRegistrySimple to use unique_ptr<Value> (Closed)
Patch Set: Android Created 3 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 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"
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/guid.h" 13 #include "base/guid.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ptr_util.h"
16 #include "base/metrics/histogram_macros.h" 17 #include "base/metrics/histogram_macros.h"
17 #include "base/sys_info.h" 18 #include "base/sys_info.h"
18 #include "base/threading/thread_task_runner_handle.h" 19 #include "base/threading/thread_task_runner_handle.h"
19 #include "base/time/time.h" 20 #include "base/time/time.h"
20 #include "base/values.h" 21 #include "base/values.h"
21 #include "base/version.h" 22 #include "base/version.h"
22 #include "build/build_config.h" 23 #include "build/build_config.h"
23 #include "chrome/browser/browser_process.h" 24 #include "chrome/browser/browser_process.h"
24 #include "chrome/browser/profiles/profile.h" 25 #include "chrome/browser/profiles/profile.h"
25 #include "chrome/browser/signin/chrome_proximity_auth_client.h" 26 #include "chrome/browser/signin/chrome_proximity_auth_client.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 249
249 EasyUnlockService::~EasyUnlockService() { 250 EasyUnlockService::~EasyUnlockService() {
250 } 251 }
251 252
252 // static 253 // static
253 void EasyUnlockService::RegisterProfilePrefs( 254 void EasyUnlockService::RegisterProfilePrefs(
254 user_prefs::PrefRegistrySyncable* registry) { 255 user_prefs::PrefRegistrySyncable* registry) {
255 registry->RegisterBooleanPref(prefs::kEasyUnlockAllowed, true); 256 registry->RegisterBooleanPref(prefs::kEasyUnlockAllowed, true);
256 registry->RegisterBooleanPref(prefs::kEasyUnlockEnabled, false); 257 registry->RegisterBooleanPref(prefs::kEasyUnlockEnabled, false);
257 registry->RegisterDictionaryPref(prefs::kEasyUnlockPairing, 258 registry->RegisterDictionaryPref(prefs::kEasyUnlockPairing,
258 new base::DictionaryValue()); 259 base::MakeUnique<base::DictionaryValue>());
259 registry->RegisterBooleanPref( 260 registry->RegisterBooleanPref(
260 prefs::kEasyUnlockProximityRequired, 261 prefs::kEasyUnlockProximityRequired,
261 false, 262 false,
262 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 263 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
263 264
264 cryptauth::CryptAuthGCMManager::RegisterPrefs(registry); 265 cryptauth::CryptAuthGCMManager::RegisterPrefs(registry);
265 cryptauth::CryptAuthDeviceManager::RegisterPrefs(registry); 266 cryptauth::CryptAuthDeviceManager::RegisterPrefs(registry);
266 cryptauth::CryptAuthEnrollmentManager::RegisterPrefs(registry); 267 cryptauth::CryptAuthEnrollmentManager::RegisterPrefs(registry);
267 268
268 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 269 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 883
883 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt 884 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt
884 // failed. 885 // failed.
885 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_) 886 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_)
886 ->PrepareTpmKey(true /* check_private_key */, 887 ->PrepareTpmKey(true /* check_private_key */,
887 base::Closure()); 888 base::Closure());
888 #endif // defined(OS_CHROMEOS) 889 #endif // defined(OS_CHROMEOS)
889 890
890 tpm_key_checked_ = true; 891 tpm_key_checked_ = true;
891 } 892 }
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugins_resource_service.cc ('k') | chrome/browser/spellchecker/spellcheck_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698