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

Side by Side Diff: chromeos/dbus/fake_shill_third_party_vpn_driver_client.h

Issue 681723003: Add new shill client for VPN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes nit from Steven Created 6 years, 1 month 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 2014 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_DBUS_FAKE_SHILL_THIRD_PARTY_VPN_DRIVER_CLIENT_H_
6 #define CHROMEOS_DBUS_FAKE_SHILL_THIRD_PARTY_VPN_DRIVER_CLIENT_H_
7
8 #include <stdint.h>
9
10 #include "chromeos/chromeos_export.h"
11 #include "chromeos/dbus/shill_third_party_vpn_driver_client.h"
12
13 namespace chromeos {
14
15 // A fake implementation of ShillThirdPartyVpnDriverClient.
16 // The client can generate fake DBus signals when
17 // ShillThirdPartyVpnDriverClient::TestInterface methods are called. The
18 // DBus methods are nops that only acknowledge the caller.
19 class CHROMEOS_EXPORT FakeShillThirdPartyVpnDriverClient
20 : public ShillThirdPartyVpnDriverClient,
21 public ShillThirdPartyVpnDriverClient::TestInterface {
22 public:
23 FakeShillThirdPartyVpnDriverClient();
24 ~FakeShillThirdPartyVpnDriverClient() override;
25
26 // ShillThirdPartyVpnDriverClient overrides
27 void Init(dbus::Bus* bus) override;
28 void AddShillThirdPartyVpnObserver(
29 const std::string& object_path_value,
30 ShillThirdPartyVpnObserver* observer) override;
31 void RemoveShillThirdPartyVpnObserver(
32 const std::string& object_path_value) override;
33 void SetParameters(
34 const std::string& object_path_value,
35 const base::DictionaryValue& parameters,
36 const base::Closure& callback,
37 const ShillClientHelper::ErrorCallback& error_callback) override;
38 void UpdateConnectionState(
39 const std::string& object_path_value,
40 const uint32_t connection_state,
41 const base::Closure& callback,
42 const ShillClientHelper::ErrorCallback& error_callback) override;
43 void SendPacket(
44 const std::string& object_path_value,
45 const std::string& ip_packet,
46 const base::Closure& callback,
47 const ShillClientHelper::ErrorCallback& error_callback) override;
48 ShillThirdPartyVpnDriverClient::TestInterface* GetTestInterface() override;
49
50 // ShillThirdPartyVpnDriverClient::TestInterface overrides
51 void OnPacketReceived(const std::string& object_path_value,
52 const std::string& packet) override;
53 void OnPlatformMessage(const std::string& object_path_value,
54 uint32_t message) override;
55
56 private:
57 using ObserverMap = std::map<std::string, ShillThirdPartyVpnObserver*>;
58
59 ObserverMap observer_map_;
60
61 DISALLOW_COPY_AND_ASSIGN(FakeShillThirdPartyVpnDriverClient);
62 };
63
64 } // namespace chromeos
65
66 #endif // CHROMEOS_DBUS_FAKE_SHILL_THIRD_PARTY_VPN_DRIVER_CLIENT_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/dbus_thread_manager.cc ('k') | chromeos/dbus/fake_shill_third_party_vpn_driver_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698