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

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

Issue 2857853005: [CrOS Tether] Create TetherDisconnector, which disconnects from active tethering sessions. (Closed)
Patch Set: hansberry@ comments. Created 3 years, 7 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/network_connection_handler_tether_delegate. h"
6
7 #include "chromeos/components/tether/tether_connector.h"
8 #include "chromeos/components/tether/tether_disconnector.h"
9
10 namespace chromeos {
11
12 namespace tether {
13
14 NetworkConnectionHandlerTetherDelegate::NetworkConnectionHandlerTetherDelegate(
15 NetworkConnectionHandler* network_connection_handler,
16 TetherConnector* tether_connector,
17 TetherDisconnector* tether_disconnector)
18 : network_connection_handler_(network_connection_handler),
19 tether_connector_(tether_connector),
20 tether_disconnector_(tether_disconnector) {
21 network_connection_handler_->SetTetherDelegate(this);
22 }
23
24 NetworkConnectionHandlerTetherDelegate::
25 ~NetworkConnectionHandlerTetherDelegate() {
26 network_connection_handler_->SetTetherDelegate(nullptr);
27 }
28
29 void NetworkConnectionHandlerTetherDelegate::DisconnectFromNetwork(
30 const std::string& tether_network_guid,
31 const base::Closure& success_callback,
32 const network_handler::StringResultCallback& error_callback) {
33 tether_disconnector_->DisconnectFromNetwork(tether_network_guid,
34 success_callback, error_callback);
35 }
36
37 void NetworkConnectionHandlerTetherDelegate::ConnectToNetwork(
38 const std::string& tether_network_guid,
39 const base::Closure& success_callback,
40 const network_handler::StringResultCallback& error_callback) {
41 tether_connector_->ConnectToNetwork(tether_network_guid, success_callback,
42 error_callback);
43 }
44
45 } // namespace tether
46
47 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698