Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 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_NETWORK_PROHIBITED_TECHNOLOGIES_HANDLER_H_ | |
| 6 #define CHROMEOS_NETWORK_PROHIBITED_TECHNOLOGIES_HANDLER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "base/values.h" | |
| 12 #include "chromeos/chromeos_export.h" | |
| 13 #include "chromeos/login/login_state.h" | |
| 14 #include "chromeos/network/network_handler.h" | |
| 15 #include "chromeos/network/network_policy_observer.h" | |
| 16 | |
| 17 namespace chromeos { | |
| 18 | |
| 19 class CHROMEOS_EXPORT ProhibitedTechnologiesHandler | |
| 20 : public LoginState::Observer, | |
| 21 public NetworkPolicyObserver { | |
| 22 public: | |
| 23 ~ProhibitedTechnologiesHandler() override; | |
| 24 | |
| 25 // LoginState::Observer | |
| 26 void LoggedInStateChanged() override; | |
| 27 | |
| 28 // NetworkPolicyObserver | |
| 29 void PoliciesChanged(const std::string& userhash) override; | |
| 30 void PoliciesApplied(const std::string& userhash) override; | |
| 31 | |
| 32 void SetProhibitedTechnologies(const base::ListValue* prohibited_list); | |
| 33 std::vector<std::string> GetCurrentlyProhibitedTechnologies(); | |
| 34 | |
| 35 private: | |
| 36 friend class NetworkHandler; | |
| 37 friend class ProhibitedTechnologiesHandlerTest; | |
| 38 | |
| 39 ProhibitedTechnologiesHandler(); | |
| 40 | |
| 41 void Init( | |
| 42 ManagedNetworkConfigurationHandler* managed_network_configuration_handler, | |
| 43 NetworkStateHandler* network_state_handler); | |
| 44 | |
| 45 void EnforceProhibitedTechnologies(); | |
| 46 | |
| 47 std::vector<std::string> prohibited_technologies_; | |
| 48 ManagedNetworkConfigurationHandler* managed_network_configuration_handler_ = | |
| 49 nullptr; | |
| 50 NetworkStateHandler* network_state_handler_ = nullptr; | |
| 51 bool user_logged_in_ = false; | |
| 52 bool user_policy_applied_ = false; | |
|
stevenjb
2015/11/12 18:20:38
Add a blank line before DISALLOW...
fqj
2015/11/13 13:53:49
Done.
| |
| 53 DISALLOW_COPY_AND_ASSIGN(ProhibitedTechnologiesHandler); | |
| 54 }; | |
| 55 | |
| 56 } // namespace chromeos | |
| 57 | |
| 58 #endif // CHROMEOS_NETWORK_PROHIBITED_TECHNOLOGIES_HANDLER_H_ | |
| OLD | NEW |