| Index: chromeos/network/managed_state.cc
|
| diff --git a/chromeos/network/managed_state.cc b/chromeos/network/managed_state.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bc52a93d002948bba59001c18c8b21a8833d002f
|
| --- /dev/null
|
| +++ b/chromeos/network/managed_state.cc
|
| @@ -0,0 +1,30 @@
|
| +// 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.
|
| +
|
| +#include "chromeos/network/managed_state.h"
|
| +
|
| +#include "chromeos/network/device_state.h"
|
| +#include "chromeos/network/network_state.h"
|
| +
|
| +namespace chromeos {
|
| +
|
| +ManagedState::ManagedState(ManagedType type, const std::string& path)
|
| + : managed_type_(type),
|
| + path_(path) {
|
| +}
|
| +
|
| +ManagedState::~ManagedState() {
|
| +}
|
| +
|
| +ManagedState* ManagedState::Create(ManagedType type, const std::string& path) {
|
| + switch(type) {
|
| + case ManagedState::MANAGED_TYPE_NETWORK:
|
| + return new NetworkState(path);
|
| + case ManagedState::MANAGED_TYPE_DEVICE:
|
| + return new DeviceState(path);
|
| + }
|
| + return NULL;
|
| +}
|
| +
|
| +} // namespace chromeos
|
|
|