1 // Copyright 2013 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.
5 #ifndef CHROMEOS_NETWORK_MOCK_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_
6 #define CHROMEOS_NETWORK_MOCK_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_
8 #include "base/basictypes.h"
9 #include "base/values.h"
10 #include "chromeos/chromeos_export.h"
11 #include "chromeos/network/managed_network_configuration_handler.h"
12 #include "testing/gmock/include/gmock/gmock.h"
16 class CHROMEOS_EXPORT MockManagedNetworkConfigurationHandler
17 : public ManagedNetworkConfigurationHandler {
19 MockManagedNetworkConfigurationHandler();
20 virtual ~MockManagedNetworkConfigurationHandler();
22 // ManagedNetworkConfigurationHandler overrides
23 MOCK_METHOD1(AddObserver, void(NetworkPolicyObserver* observer));
24 MOCK_METHOD1(RemoveObserver, void(NetworkPolicyObserver* observer));
27 void(const std::string& service_path,
28 const network_handler::DictionaryResultCallback& callback,
29 const network_handler::ErrorCallback& error_callback));
30 MOCK_METHOD4(GetManagedProperties,
31 void(const std::string& userhash,
32 const std::string& service_path,
33 const network_handler::DictionaryResultCallback& callback,
34 const network_handler::ErrorCallback& error_callback));
37 void(const std::string& service_path,
38 const base::DictionaryValue& user_settings,
39 const base::Closure& callback,
40 const network_handler::ErrorCallback& error_callback));
43 void(const std::string& userhash,
44 const base::DictionaryValue& properties,
45 const network_handler::StringResultCallback& callback,
46 const network_handler::ErrorCallback& error_callback));
49 void(const std::string& service_path,
50 const base::Closure& callback,
51 const network_handler::ErrorCallback& error_callback));
52 MOCK_METHOD4(SetPolicy,
53 void(::onc::ONCSource onc_source,
54 const std::string& userhash,
55 const base::ListValue& network_configs_onc,
56 const base::DictionaryValue& global_network_config));
57 MOCK_CONST_METHOD3(FindPolicyByGUID,
58 const base::DictionaryValue*(
59 const std::string userhash,
60 const std::string& guid,
61 ::onc::ONCSource* onc_source));
62 MOCK_CONST_METHOD1(GetGlobalConfigFromPolicy,
63 const base::DictionaryValue*(const std::string userhash));
65 FindPolicyByGuidAndProfile,
66 const base::DictionaryValue*(const std::string& guid,
67 const std::string& profile_path));
70 DISALLOW_COPY_AND_ASSIGN(MockManagedNetworkConfigurationHandler);
73 } // namespace chromeos
75 #endif // CHROMEOS_NETWORK_MOCK_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_