| OLD | NEW |
| 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/wifi_hotspot_connector.h" | 5 #include "chromeos/components/tether/wifi_hotspot_connector.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/guid.h" | 8 #include "base/guid.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "chromeos/network/network_connect.h" | 10 #include "chromeos/network/network_connect.h" |
| 11 #include "chromeos/network/network_handler.h" | 11 #include "chromeos/network/network_handler.h" |
| 12 #include "chromeos/network/network_state.h" | 12 #include "chromeos/network/network_state.h" |
| 13 #include "chromeos/network/network_state_handler.h" | 13 #include "chromeos/network/network_state_handler.h" |
| 14 #include "chromeos/network/shill_property_util.h" | 14 #include "chromeos/network/shill_property_util.h" |
| 15 #include "components/proximity_auth/logging/logging.h" | 15 #include "components/proximity_auth/logging/logging.h" |
| 16 #include "third_party/cros_system_api/dbus/shill/dbus-constants.h" | 16 #include "third_party/cros_system_api/dbus/shill/dbus-constants.h" |
| 17 | 17 |
| 18 namespace chromeos { | 18 namespace chromeos { |
| 19 | 19 |
| 20 namespace tether { | 20 namespace tether { |
| 21 | 21 |
| 22 WifiHotspotConnector::WifiHotspotConnector() |
| 23 : WifiHotspotConnector(NetworkHandler::Get()->network_state_handler(), |
| 24 NetworkConnect::Get()) {} |
| 25 |
| 22 WifiHotspotConnector::WifiHotspotConnector( | 26 WifiHotspotConnector::WifiHotspotConnector( |
| 23 NetworkStateHandler* network_state_handler, | 27 NetworkStateHandler* network_state_handler, |
| 24 NetworkConnect* network_connect) | 28 NetworkConnect* network_connect) |
| 25 : network_state_handler_(network_state_handler), | 29 : network_state_handler_(network_state_handler), |
| 26 network_connect_(network_connect), | 30 network_connect_(network_connect), |
| 27 timer_(base::MakeUnique<base::OneShotTimer>()), | 31 timer_(base::MakeUnique<base::OneShotTimer>()), |
| 28 weak_ptr_factory_(this) { | 32 weak_ptr_factory_(this) { |
| 29 network_state_handler_->AddObserver(this, FROM_HERE); | 33 network_state_handler_->AddObserver(this, FROM_HERE); |
| 30 } | 34 } |
| 31 | 35 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 InvokeWifiConnectionCallback(std::string()); | 140 InvokeWifiConnectionCallback(std::string()); |
| 137 } | 141 } |
| 138 | 142 |
| 139 void WifiHotspotConnector::SetTimerForTest(std::unique_ptr<base::Timer> timer) { | 143 void WifiHotspotConnector::SetTimerForTest(std::unique_ptr<base::Timer> timer) { |
| 140 timer_ = std::move(timer); | 144 timer_ = std::move(timer); |
| 141 } | 145 } |
| 142 | 146 |
| 143 } // namespace tether | 147 } // namespace tether |
| 144 | 148 |
| 145 } // namespace chromeos | 149 } // namespace chromeos |
| OLD | NEW |