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

Side by Side Diff: chrome/browser/chromeos/tether/fake_tether_service.h

Issue 2900903002: Create a FakeTetherService, which stubs out TetherService for development. (Closed)
Patch Set: Fix TetherService tests. 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 #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_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/tether/BUILD.gn ('k') | chrome/browser/chromeos/tether/fake_tether_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698