Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: chromeos/network/managed_state.cc

Issue 11192024: Add chromeos::NetworkStateManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to feedback Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..126d1866137224f89d3429434fa1786346a11146
--- /dev/null
+++ b/chromeos/network/managed_state.cc
@@ -0,0 +1,22 @@
+// 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::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

Powered by Google App Engine
This is Rietveld 408576698