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/active_host_network_state_updater.h

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 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 #ifndef CHROMEOS_COMPONENTS_TETHER_ACTIVE_HOST_NETWORK_STATE_UPDATER_H_ 5 #ifndef CHROMEOS_COMPONENTS_TETHER_ACTIVE_HOST_NETWORK_STATE_UPDATER_H_
6 #define CHROMEOS_COMPONENTS_TETHER_ACTIVE_HOST_NETWORK_STATE_UPDATER_H_ 6 #define CHROMEOS_COMPONENTS_TETHER_ACTIVE_HOST_NETWORK_STATE_UPDATER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "chromeos/components/tether/active_host.h" 10 #include "chromeos/components/tether/active_host.h"
11 11
12 namespace chromeos { 12 namespace chromeos {
13 13
14 class NetworkStateHandler; 14 class NetworkStateHandler;
15 15
16 namespace tether { 16 namespace tether {
17 17
18 // Observes changes to the status of the active host, and relays these updates 18 // Observes changes to the status of the active host, and relays these updates
19 // to the networking stack. 19 // to the networking stack.
20 class ActiveHostNetworkStateUpdater : public ActiveHost::Observer { 20 class ActiveHostNetworkStateUpdater : public ActiveHost::Observer {
21 public: 21 public:
22 ActiveHostNetworkStateUpdater(ActiveHost* active_host); 22 ActiveHostNetworkStateUpdater(ActiveHost* active_host,
23 NetworkStateHandler* network_state_handler);
23 ~ActiveHostNetworkStateUpdater(); 24 ~ActiveHostNetworkStateUpdater();
24 25
25 // ActiveHost::Observer: 26 // ActiveHost::Observer:
26 void OnActiveHostChanged( 27 void OnActiveHostChanged(
27 const ActiveHost::ActiveHostChangeInfo& change_info) override; 28 const ActiveHost::ActiveHostChangeInfo& change_info) override;
28 29
29 private: 30 private:
30 friend class ActiveHostNetworkStateUpdaterTest;
31
32 ActiveHostNetworkStateUpdater(ActiveHost* active_host,
33 NetworkStateHandler* network_state_handler);
34
35 ActiveHost* active_host_; 31 ActiveHost* active_host_;
36 NetworkStateHandler* network_state_handler_; 32 NetworkStateHandler* network_state_handler_;
37 33
38 DISALLOW_COPY_AND_ASSIGN(ActiveHostNetworkStateUpdater); 34 DISALLOW_COPY_AND_ASSIGN(ActiveHostNetworkStateUpdater);
39 }; 35 };
40 36
41 } // namespace tether 37 } // namespace tether
42 38
43 } // namespace chromeos 39 } // namespace chromeos
44 40
45 #endif // CHROMEOS_COMPONENTS_TETHER_ACTIVE_HOST_NETWORK_STATE_UPDATER_H_ 41 #endif // CHROMEOS_COMPONENTS_TETHER_ACTIVE_HOST_NETWORK_STATE_UPDATER_H_
OLDNEW
« no previous file with comments | « chromeos/components/tether/DEPS ('k') | chromeos/components/tether/active_host_network_state_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698