Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROMEOS_NETWORK_MANAGED_STATE_H_ | |
| 6 #define CHROMEOS_NETWORK_MANAGED_STATE_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/basictypes.h" | |
| 11 #include "base/compiler_specific.h" | |
| 12 #include "chromeos/chromeos_export.h" | |
| 13 #include "chromeos/network/managed_state.h" | |
| 14 #include "third_party/cros_system_api/dbus/service_constants.h" | |
| 15 | |
| 16 namespace base { | |
| 17 class Value; | |
| 18 } | |
| 19 | |
| 20 namespace chromeos { | |
| 21 | |
| 22 class ManagedState { | |
|
Greg Spencer (Chromium)
2012/10/23 23:19:10
Add a class comment for this class.
stevenjb
2012/10/25 00:41:58
Done.
| |
| 23 public: | |
| 24 enum ManagedType { | |
| 25 MANAGED_TYPE_NETWORK, | |
| 26 MANAGED_TYPE_DEVICE | |
| 27 }; | |
| 28 | |
| 29 ManagedState(ManagedType type, const std::string& path) | |
| 30 : managed_type_(type), | |
| 31 path_(path) { | |
| 32 } | |
| 33 | |
| 34 static ManagedState* Create(ManagedType type, const std::string& path); | |
| 35 | |
| 36 virtual bool PropertyChanged(const std::string& key, | |
| 37 const base::Value& value) = 0; | |
| 38 | |
| 39 const ManagedType managed_type() const { return managed_type_; } | |
| 40 const std::string& path() const { return path_; } | |
| 41 | |
| 42 private: | |
| 43 ManagedType managed_type_; | |
| 44 std::string path_; | |
| 45 }; | |
| 46 | |
| 47 } // namespace chromeos | |
| 48 | |
| 49 #endif // CHROMEOS_NETWORK_MANAGED_STATE_H_ | |
| OLD | NEW |