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 #ifndef CHROME_BROWSER_CHROMEOS_TETHER_FAKE_TETHER_SERVICE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_TETHER_FAKE_TETHER_SERVICE_H_ |
| 7 |
| 8 #include "chrome/browser/chromeos/tether/tether_service.h" |
| 9 |
| 10 // A stub of TetherService that provides an easy way to develop for Tether on |
| 11 // non-Chromebooks or without a Tether host. To use, see |
| 12 // chromeos::switches::kTetherStub for more details. |
| 13 class FakeTetherService : public TetherService { |
| 14 public: |
| 15 FakeTetherService(Profile* profile, |
| 16 chromeos::PowerManagerClient* power_manager_client, |
| 17 chromeos::SessionManagerClient* session_manager_client, |
| 18 cryptauth::CryptAuthService* cryptauth_service, |
| 19 chromeos::NetworkStateHandler* network_state_handler); |
| 20 |
| 21 // TetherService: |
| 22 void StartTetherIfEnabled() override; |
| 23 void StopTether() override; |
| 24 |
| 25 void set_num_tether_networks(int num_tether_networks) { |
| 26 num_tether_networks_ = num_tether_networks; |
| 27 } |
| 28 |
| 29 protected: |
| 30 // TetherService: |
| 31 bool HasSyncedTetherHosts() const override; |
| 32 |
| 33 private: |
| 34 int num_tether_networks_ = 1; |
| 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(FakeTetherService); |
| 37 }; |
| 38 |
| 39 #endif // CHROME_BROWSER_CHROMEOS_TETHER_FAKE_TETHER_SERVICE_H_ |
OLD | NEW |