Chromium Code Reviews| Index: chromeos/network/managed_state.h |
| diff --git a/chromeos/network/managed_state.h b/chromeos/network/managed_state.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..627cb7c4bc9f13e3f06ebdc65676a7ac9d811ab5 |
| --- /dev/null |
| +++ b/chromeos/network/managed_state.h |
| @@ -0,0 +1,49 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROMEOS_NETWORK_MANAGED_STATE_H_ |
| +#define CHROMEOS_NETWORK_MANAGED_STATE_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/basictypes.h" |
| +#include "base/compiler_specific.h" |
| +#include "chromeos/chromeos_export.h" |
| +#include "chromeos/network/managed_state.h" |
| +#include "third_party/cros_system_api/dbus/service_constants.h" |
| + |
| +namespace base { |
| +class Value; |
| +} |
| + |
| +namespace chromeos { |
| + |
| +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.
|
| + public: |
| + enum ManagedType { |
| + MANAGED_TYPE_NETWORK, |
| + MANAGED_TYPE_DEVICE |
| + }; |
| + |
| + ManagedState(ManagedType type, const std::string& path) |
| + : managed_type_(type), |
| + path_(path) { |
| + } |
| + |
| + static ManagedState* Create(ManagedType type, const std::string& path); |
| + |
| + virtual bool PropertyChanged(const std::string& key, |
| + const base::Value& value) = 0; |
| + |
| + const ManagedType managed_type() const { return managed_type_; } |
| + const std::string& path() const { return path_; } |
| + |
| + private: |
| + ManagedType managed_type_; |
| + std::string path_; |
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROMEOS_NETWORK_MANAGED_STATE_H_ |