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

Side by Side Diff: chromeos/components/tether/initializer.cc

Issue 2805833002: Migrate Cryptauth*Managers RegisterPrefs to CryptAuthService::RegisterProfilePrefs. (Closed)
Patch Set: 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chromeos/components/tether/initializer.h" 5 #include "chromeos/components/tether/initializer.h"
6 6
7 #include "chromeos/components/tether/active_host.h"
8 #include "chromeos/components/tether/host_scan_device_prioritizer.h"
9
7 namespace chromeos { 10 namespace chromeos {
8 11
9 namespace tether { 12 namespace tether {
10 13
11 // static 14 // static
12 Initializer* Initializer::instance_ = nullptr; 15 Initializer* Initializer::instance_ = nullptr;
13 16
14 void Initializer::Initialize(cryptauth::CryptAuthService* cryptauth_service) { 17 void Initializer::Initialize(cryptauth::CryptAuthService* cryptauth_service) {
15 if (instance_) { 18 if (instance_) {
16 // TODO(khorimoto): Determine if a new instance should be created. 19 // TODO(khorimoto): Determine if a new instance should be created.
17 instance_->cryptauth_service_ = cryptauth_service; 20 instance_->cryptauth_service_ = cryptauth_service;
18 } else { 21 } else {
19 instance_ = new Initializer(cryptauth_service); 22 instance_ = new Initializer(cryptauth_service);
20 } 23 }
21 } 24 }
22 25
26 // static
27 void Initializer::RegisterProfilePrefs(PrefRegistrySimple* registry) {
28 ActiveHost::RegisterPrefs(registry);
29 HostScanDevicePrioritizer::RegisterPrefs(registry);
30 }
31
23 Initializer::Initializer(cryptauth::CryptAuthService* cryptauth_service) 32 Initializer::Initializer(cryptauth::CryptAuthService* cryptauth_service)
24 : cryptauth_service_(cryptauth_service) {} 33 : cryptauth_service_(cryptauth_service) {}
25 34
26 Initializer::~Initializer() {} 35 Initializer::~Initializer() {}
27 36
28 } // namespace tether 37 } // namespace tether
29 38
30 } // namespace chromeos 39 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698