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

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

Issue 2801353002: [CrOS Tether] Fill out the Initializer class. Tether will now initialize fully once the flag is ena… (Closed)
Patch Set: hansberry@ comments, DEPS change. 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/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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698