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

Side by Side 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 Round 2 Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 #include "chromeos/network/managed_state.h"
6
7 #include "chromeos/network/device_state.h"
8 #include "chromeos/network/network_state.h"
9
10 namespace chromeos {
11
12 ManagedState::ManagedState(ManagedType type, const std::string& path)
13 : managed_type_(type),
14 path_(path) {
15 }
16
17 ManagedState::~ManagedState() {
18 }
19
20 ManagedState* ManagedState::Create(ManagedType type, const std::string& path) {
21 switch(type) {
22 case ManagedState::MANAGED_TYPE_NETWORK:
23 return new NetworkState(path);
24 case ManagedState::MANAGED_TYPE_DEVICE:
25 return new DeviceState(path);
26 }
27 return NULL;
28 }
29
30 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698