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

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

Issue 2801353002: [CrOS Tether] Fill out the Initializer class. Tether will now initialize fully once the flag is ena… (Closed)
Patch Set: Added missing dep. 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/active_host_network_state_updater.h" 5 #include "chromeos/components/tether/active_host_network_state_updater.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "chromeos/components/tether/active_host.h" 8 #include "chromeos/components/tether/active_host.h"
9 #include "chromeos/network/network_state_handler.h" 9 #include "chromeos/network/network_state_handler.h"
10 #include "components/cryptauth/remote_device.h" 10 #include "components/cryptauth/remote_device.h"
11 #include "components/proximity_auth/logging/logging.h" 11 #include "components/proximity_auth/logging/logging.h"
12 12
13 namespace chromeos { 13 namespace chromeos {
14 14
15 namespace tether { 15 namespace tether {
16 16
17 ActiveHostNetworkStateUpdater::ActiveHostNetworkStateUpdater( 17 ActiveHostNetworkStateUpdater::ActiveHostNetworkStateUpdater(
18 ActiveHost* active_host)
19 : ActiveHostNetworkStateUpdater(
20 active_host,
21 NetworkHandler::Get()->network_state_handler()) {}
22
23 ActiveHostNetworkStateUpdater::ActiveHostNetworkStateUpdater(
24 ActiveHost* active_host, 18 ActiveHost* active_host,
25 NetworkStateHandler* network_state_handler) 19 NetworkStateHandler* network_state_handler)
26 : active_host_(active_host), network_state_handler_(network_state_handler) { 20 : active_host_(active_host), network_state_handler_(network_state_handler) {
27 active_host_->AddObserver(this); 21 active_host_->AddObserver(this);
28 } 22 }
29 23
30 ActiveHostNetworkStateUpdater::~ActiveHostNetworkStateUpdater() { 24 ActiveHostNetworkStateUpdater::~ActiveHostNetworkStateUpdater() {
31 active_host_->RemoveObserver(this); 25 active_host_->RemoveObserver(this);
32 } 26 }
33 27
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 network_state_handler_->SetTetherNetworkStateConnected( 74 network_state_handler_->SetTetherNetworkStateConnected(
81 change_info.new_tether_network_guid); 75 change_info.new_tether_network_guid);
82 break; 76 break;
83 } 77 }
84 } 78 }
85 } 79 }
86 80
87 } // namespace tether 81 } // namespace tether
88 82
89 } // namespace chromeos 83 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/components/tether/active_host_network_state_updater.h ('k') | chromeos/components/tether/fake_tether_host_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698