Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
|
Kyle Horimoto
2017/04/17 20:34:53
Should this file be added to //chromeos/network? I
stevenjb
2017/04/18 21:03:36
+1, although we do also already have a MockMNCH, a
Ryan Hansberry
2017/04/20 20:57:57
Removed this file.
| |
| 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_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ | |
| 6 #define CHROMEOS_COMPONENTS_TETHER_FAKE_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 #include <string> | |
| 10 | |
| 11 #include "base/macros.h" | |
| 12 #include "chromeos/network/managed_network_configuration_handler.h" | |
| 13 #include "chromeos/network/network_handler_callbacks.h" | |
| 14 #include "chromeos/network/network_policy_observer.h" | |
| 15 | |
| 16 namespace chromeos { | |
| 17 | |
| 18 namespace tether { | |
| 19 | |
| 20 using GuidToPolicyMap = | |
| 21 std::map<std::string, std::unique_ptr<base::DictionaryValue>>; | |
| 22 | |
| 23 class FakeManagedNetworkConfigurationHandler | |
| 24 : public ManagedNetworkConfigurationHandler { | |
| 25 public: | |
| 26 FakeManagedNetworkConfigurationHandler(); | |
| 27 | |
| 28 void AddObserver(NetworkPolicyObserver* observer) override; | |
| 29 void RemoveObserver(NetworkPolicyObserver* observer) override; | |
| 30 | |
| 31 void GetProperties( | |
| 32 const std::string& userhash, | |
| 33 const std::string& service_path, | |
| 34 const network_handler::DictionaryResultCallback& callback, | |
| 35 const network_handler::ErrorCallback& error_callback) override; | |
| 36 void GetManagedProperties( | |
| 37 const std::string& userhash, | |
| 38 const std::string& service_path, | |
| 39 const network_handler::DictionaryResultCallback& callback, | |
| 40 const network_handler::ErrorCallback& error_callback) override; | |
| 41 void SetProperties( | |
| 42 const std::string& service_path, | |
| 43 const base::DictionaryValue& user_settings, | |
| 44 const base::Closure& callback, | |
| 45 const network_handler::ErrorCallback& error_callback) override; | |
| 46 void CreateConfiguration( | |
| 47 const std::string& userhash, | |
| 48 const base::DictionaryValue& properties, | |
| 49 const network_handler::ServiceResultCallback& callback, | |
| 50 const network_handler::ErrorCallback& error_callback) const override; | |
| 51 void RemoveConfiguration( | |
| 52 const std::string& service_path, | |
| 53 const base::Closure& callback, | |
| 54 const network_handler::ErrorCallback& error_callback) const override; | |
| 55 void RemoveConfigurationFromCurrentProfile( | |
| 56 const std::string& service_path, | |
| 57 const base::Closure& callback, | |
| 58 const network_handler::ErrorCallback& error_callback) const override; | |
| 59 void SetPolicy(::onc::ONCSource onc_source, | |
| 60 const std::string& userhash, | |
| 61 const base::ListValue& network_configs_onc, | |
| 62 const base::DictionaryValue& global_network_config) override; | |
| 63 bool IsAnyPolicyApplicationRunning() const override; | |
| 64 const base::DictionaryValue* FindPolicyByGUID( | |
| 65 const std::string userhash, | |
| 66 const std::string& guid, | |
| 67 ::onc::ONCSource* onc_source) const override; | |
| 68 const GuidToPolicyMap* GetNetworkConfigsFromPolicy( | |
| 69 const std::string& userhash) const override; | |
| 70 const base::DictionaryValue* GetGlobalConfigFromPolicy( | |
| 71 const std::string& userhash) const override; | |
| 72 const base::DictionaryValue* FindPolicyByGuidAndProfile( | |
| 73 const std::string& guid, | |
| 74 const std::string& profile_path) const override; | |
| 75 | |
| 76 const std::string& last_removed_configuration_path() const; | |
|
Kyle Horimoto
2017/04/17 20:34:53
Inline this.
Ryan Hansberry
2017/04/20 20:57:57
Removed this file.
| |
| 77 | |
| 78 private: | |
| 79 std::string last_removed_configuration_path_; | |
| 80 | |
| 81 DISALLOW_COPY_AND_ASSIGN(FakeManagedNetworkConfigurationHandler); | |
| 82 }; | |
| 83 | |
| 84 } // namespace tether | |
| 85 | |
| 86 } // namespace chromeos | |
| 87 | |
| 88 #endif // CHROMEOS_COMPONENTS_TETHER_FAKE_MANAGED_NETWORK_CONFIGURATION_HANDLER _H_ | |
| OLD | NEW |