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

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

Issue 10949030: This converts the Shill clients to allow propagation of shill errors (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: review changes Created 8 years, 2 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROMEOS_DBUS_MOCK_SHILL_SERVICE_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_MOCK_SHILL_SERVICE_CLIENT_H_
6 #define CHROMEOS_DBUS_MOCK_SHILL_SERVICE_CLIENT_H_ 6 #define CHROMEOS_DBUS_MOCK_SHILL_SERVICE_CLIENT_H_
7 7
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chromeos/dbus/shill_service_client.h" 9 #include "chromeos/dbus/shill_service_client.h"
10 #include "dbus/object_path.h" 10 #include "dbus/object_path.h"
11 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
12 12
13 namespace chromeos { 13 namespace chromeos {
14 14
15 class MockShillServiceClient : public ShillServiceClient { 15 class MockShillServiceClient : public ShillServiceClient {
16 public: 16 public:
17 MockShillServiceClient(); 17 MockShillServiceClient();
18 virtual ~MockShillServiceClient(); 18 virtual ~MockShillServiceClient();
19 19
20 MOCK_METHOD2(SetPropertyChangedHandler, 20 MOCK_METHOD2(SetPropertyChangedHandler,
21 void(const dbus::ObjectPath& service_path, 21 void(const dbus::ObjectPath& service_path,
22 const PropertyChangedHandler& handler)); 22 const PropertyChangedHandler& handler));
23 MOCK_METHOD1(ResetPropertyChangedHandler, 23 MOCK_METHOD1(ResetPropertyChangedHandler,
24 void(const dbus::ObjectPath& service_path)); 24 void(const dbus::ObjectPath& service_path));
25 MOCK_METHOD2(GetProperties, void(const dbus::ObjectPath& service_path, 25 MOCK_METHOD2(GetProperties, void(const dbus::ObjectPath& service_path,
26 const DictionaryValueCallback& callback)); 26 const DictionaryValueCallback& callback));
27 MOCK_METHOD4(SetProperty, void(const dbus::ObjectPath& service_path, 27 MOCK_METHOD5(SetProperty, void(const dbus::ObjectPath& service_path,
28 const std::string& name, 28 const std::string& name,
29 const base::Value& value, 29 const base::Value& value,
30 const VoidDBusMethodCallback& callback)); 30 const base::Closure& callback,
31 MOCK_METHOD3(ClearProperty, void(const dbus::ObjectPath& service_path, 31 const ErrorCallback& error_callback));
32 MOCK_METHOD4(ClearProperty, void(const dbus::ObjectPath& service_path,
32 const std::string& name, 33 const std::string& name,
33 const VoidDBusMethodCallback& callback)); 34 const base::Closure& callback,
35 const ErrorCallback& error_callback));
34 MOCK_METHOD3(Connect, void(const dbus::ObjectPath& service_path, 36 MOCK_METHOD3(Connect, void(const dbus::ObjectPath& service_path,
35 const base::Closure& callback, 37 const base::Closure& callback,
36 const ErrorCallback& error_callback)); 38 const ErrorCallback& error_callback));
37 MOCK_METHOD2(Disconnect, void(const dbus::ObjectPath& service_path, 39 MOCK_METHOD3(Disconnect, void(const dbus::ObjectPath& service_path,
38 const VoidDBusMethodCallback& callback)); 40 const base::Closure& callback,
39 MOCK_METHOD2(Remove, void(const dbus::ObjectPath& service_path, 41 const ErrorCallback& error_callback));
40 const VoidDBusMethodCallback& callback)); 42 MOCK_METHOD3(Remove, void(const dbus::ObjectPath& service_path,
41 MOCK_METHOD3(ActivateCellularModem, 43 const base::Closure& callback,
44 const ErrorCallback& error_callback));
45 MOCK_METHOD4(ActivateCellularModem,
42 void(const dbus::ObjectPath& service_path, 46 void(const dbus::ObjectPath& service_path,
43 const std::string& carrier, 47 const std::string& carrier,
44 const VoidDBusMethodCallback& callback)); 48 const base::Closure& callback,
49 const ErrorCallback& error_callback));
45 MOCK_METHOD2(CallActivateCellularModemAndBlock, 50 MOCK_METHOD2(CallActivateCellularModemAndBlock,
46 bool(const dbus::ObjectPath& service_path, 51 bool(const dbus::ObjectPath& service_path,
47 const std::string& carrier)); 52 const std::string& carrier));
48 }; 53 };
49 54
50 } // namespace chromeos 55 } // namespace chromeos
51 56
52 #endif // CHROMEOS_DBUS_MOCK_SHILL_SERVICE_CLIENT_H_ 57 #endif // CHROMEOS_DBUS_MOCK_SHILL_SERVICE_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698