| OLD | NEW |
| (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 | |
| OLD | NEW |