OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/network/network_connect.h" | 5 #include "chromeos/network/network_connect.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 } | 68 } |
69 | 69 |
70 // NetworkConnectionHandler::TetherDelegate: | 70 // NetworkConnectionHandler::TetherDelegate: |
71 void ConnectToNetwork( | 71 void ConnectToNetwork( |
72 const std::string& tether_network_guid, | 72 const std::string& tether_network_guid, |
73 const base::Closure& success_callback, | 73 const base::Closure& success_callback, |
74 const network_handler::StringResultCallback& error_callback) override { | 74 const network_handler::StringResultCallback& error_callback) override { |
75 last_connected_tether_network_guid_ = tether_network_guid; | 75 last_connected_tether_network_guid_ = tether_network_guid; |
76 success_callback.Run(); | 76 success_callback.Run(); |
77 } | 77 } |
| 78 void DisconnectFromNetwork( |
| 79 const std::string& tether_network_guid, |
| 80 const base::Closure& success_callback, |
| 81 const network_handler::StringResultCallback& error_callback) override {} |
78 | 82 |
79 private: | 83 private: |
80 std::string last_connected_tether_network_guid_; | 84 std::string last_connected_tether_network_guid_; |
81 }; | 85 }; |
82 | 86 |
83 } // namespace | 87 } // namespace |
84 | 88 |
85 class NetworkConnectTest : public testing::Test { | 89 class NetworkConnectTest : public testing::Test { |
86 public: | 90 public: |
87 NetworkConnectTest() {} | 91 NetworkConnectTest() {} |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 kCellular1DevicePath, shill::kSIMPresentProperty, base::Value(true)); | 378 kCellular1DevicePath, shill::kSIMPresentProperty, base::Value(true)); |
375 device_test_->SetSimLocked(kCellular1DevicePath, false); | 379 device_test_->SetSimLocked(kCellular1DevicePath, false); |
376 | 380 |
377 base::RunLoop().RunUntilIdle(); | 381 base::RunLoop().RunUntilIdle(); |
378 | 382 |
379 NetworkConnect::Get()->SetTechnologyEnabled(NetworkTypePattern::Cellular(), | 383 NetworkConnect::Get()->SetTechnologyEnabled(NetworkTypePattern::Cellular(), |
380 true); | 384 true); |
381 } | 385 } |
382 | 386 |
383 } // namespace chromeos | 387 } // namespace chromeos |
OLD | NEW |