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

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

Issue 2819993002: [CrOS Tether] Add the notion of a tether DeviceState. (Closed)
Patch Set: stevenjb@ comment. 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chromeos/components/tether/tether_device_state_manager.h"
6
7 #include "chromeos/network/network_state_handler.h"
8
9 namespace chromeos {
10
11 namespace tether {
12
13 TetherDeviceStateManager::TetherDeviceStateManager(
14 NetworkStateHandler* network_state_handler)
15 : network_state_handler_(network_state_handler) {
16 network_state_handler_->AddObserver(this, FROM_HERE);
17
18 // TODO(hansberry): Set the appropriate value. For now, always set ENABLED.
19 network_state_handler_->SetTetherTechnologyState(
20 NetworkStateHandler::TechnologyState::TECHNOLOGY_ENABLED);
21 }
22
23 TetherDeviceStateManager::~TetherDeviceStateManager() {
24 network_state_handler_->RemoveObserver(this, FROM_HERE);
25
26 // TODO(hansberry): Determine if this should be PROHIBITED or UNAVAILABLE
27 // based on reason for shutting down.
28 network_state_handler_->SetTetherTechnologyState(
29 NetworkStateHandler::TechnologyState::TECHNOLOGY_UNAVAILABLE);
30 }
31
32 void TetherDeviceStateManager::DeviceListChanged() {
33 // TODO(hansberry): Implement.
34 }
35
36 } // namespace tether
37
38 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/components/tether/tether_device_state_manager.h ('k') | chromeos/network/device_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698