[Session restore] Rename group name Enabled to Restore.
[chromium-blink-merge.git] / chromeos / network / mock_managed_network_configuration_handler.h
blob0ba3579e94609e887456c0a067247b305943ea4e
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 <string>
10 #include "base/basictypes.h"
11 #include "base/values.h"
12 #include "chromeos/chromeos_export.h"
13 #include "chromeos/network/managed_network_configuration_handler.h"
14 #include "testing/gmock/include/gmock/gmock.h"
16 namespace chromeos {
18 class CHROMEOS_EXPORT MockManagedNetworkConfigurationHandler
19 : public ManagedNetworkConfigurationHandler {
20 public:
21 MockManagedNetworkConfigurationHandler();
22 virtual ~MockManagedNetworkConfigurationHandler();
24 // ManagedNetworkConfigurationHandler overrides
25 MOCK_METHOD1(AddObserver, void(NetworkPolicyObserver* observer));
26 MOCK_METHOD1(RemoveObserver, void(NetworkPolicyObserver* observer));
27 MOCK_METHOD3(GetProperties,
28 void(const std::string& service_path,
29 const network_handler::DictionaryResultCallback& callback,
30 const network_handler::ErrorCallback& error_callback));
31 MOCK_METHOD4(GetManagedProperties,
32 void(const std::string& userhash,
33 const std::string& service_path,
34 const network_handler::DictionaryResultCallback& callback,
35 const network_handler::ErrorCallback& error_callback));
36 MOCK_METHOD4(SetProperties,
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));
41 MOCK_CONST_METHOD4(
42 CreateConfiguration,
43 void(const std::string& userhash,
44 const base::DictionaryValue& properties,
45 const network_handler::StringResultCallback& callback,
46 const network_handler::ErrorCallback& error_callback));
47 MOCK_CONST_METHOD3(
48 RemoveConfiguration,
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_METHOD0(IsAnyPolicyApplicationRunning, bool());
58 MOCK_CONST_METHOD3(FindPolicyByGUID,
59 const base::DictionaryValue*(
60 const std::string userhash,
61 const std::string& guid,
62 ::onc::ONCSource* onc_source));
63 MOCK_CONST_METHOD1(GetNetworkConfigsFromPolicy,
64 const GuidToPolicyMap*(const std::string& userhash));
65 MOCK_CONST_METHOD1(GetGlobalConfigFromPolicy,
66 const base::DictionaryValue*(const std::string& userhash));
67 MOCK_CONST_METHOD2(
68 FindPolicyByGuidAndProfile,
69 const base::DictionaryValue*(const std::string& guid,
70 const std::string& profile_path));
72 private:
73 DISALLOW_COPY_AND_ASSIGN(MockManagedNetworkConfigurationHandler);
76 } // namespace chromeos
78 #endif // CHROMEOS_NETWORK_MOCK_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_