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

Side by Side Diff: chromeos/components/tether/fake_active_host.h

Issue 2741253002: [CrOS Tether] Create KeepAliveScheduler, a class which schedules keep-alive tickles to be sent to a… (Closed)
Patch Set: Add missing dependency. Created 3 years, 9 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 CHROMEOS_COMPONENTS_TETHER_FAKE_ACTIVE_HOST_H_
6 #define CHROMEOS_COMPONENTS_TETHER_FAKE_ACTIVE_HOST_H_
7
8 #include <string>
9
10 #include "base/callback.h"
11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h"
13 #include "base/observer_list.h"
14 #include "chromeos/components/tether/active_host.h"
15
16 namespace chromeos {
17
18 namespace tether {
19
20 // Test double for ActiveHost.
21 class FakeActiveHost : public ActiveHost {
22 public:
23 FakeActiveHost();
24 ~FakeActiveHost() override;
25
26 // ActiveHost:
27 void SetActiveHostDisconnected() override;
28 void SetActiveHostConnecting(
29 const std::string& active_host_device_id) override;
30 void SetActiveHostConnected(const std::string& active_host_device_id,
31 const std::string& wifi_network_id) override;
32 void GetActiveHost(
33 const ActiveHost::ActiveHostCallback& active_host_callback) override;
34 ActiveHostStatus GetActiveHostStatus() const override;
35 std::string GetActiveHostDeviceId() const override;
36 std::string GetWifiNetworkId() const override;
37
38 private:
39 void SetActiveHost(ActiveHostStatus active_host_status,
40 const std::string& active_host_device_id,
41 const std::string& wifi_network_id);
42
43 ActiveHost::ActiveHostStatus active_host_status_;
44 std::string active_host_device_id_;
45 std::string wifi_network_id_;
46
47 DISALLOW_COPY_AND_ASSIGN(FakeActiveHost);
48 };
49
50 } // namespace tether
51
52 } // namespace chromeos
53
54 #endif // CHROMEOS_COMPONENTS_TETHER_FAKE_ACTIVE_HOST_H_
OLDNEW
« no previous file with comments | « chromeos/components/tether/active_host_unittest.cc ('k') | chromeos/components/tether/fake_active_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698