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

Side by Side Diff: chromeos/network/network_state.cc

Issue 11414101: This adds ManagedNetworkConfigurationHandler first pass (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: upload after merge Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chromeos/network/network_state.h ('k') | chromeos/network/onc/onc_mapper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromeos/network/network_state.h" 5 #include "chromeos/network/network_state.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "third_party/cros_system_api/dbus/service_constants.h" 8 #include "third_party/cros_system_api/dbus/service_constants.h"
9 9
10 namespace chromeos { 10 namespace chromeos {
(...skipping 19 matching lines...) Expand all
30 } else if (key == flimflam::kActivationStateProperty) { 30 } else if (key == flimflam::kActivationStateProperty) {
31 return GetStringValue(key, value, &activation_state_); 31 return GetStringValue(key, value, &activation_state_);
32 } else if (key == flimflam::kRoamingStateProperty) { 32 } else if (key == flimflam::kRoamingStateProperty) {
33 return GetStringValue(key, value, &roaming_); 33 return GetStringValue(key, value, &roaming_);
34 } else if (key == flimflam::kSecurityProperty) { 34 } else if (key == flimflam::kSecurityProperty) {
35 return GetStringValue(key, value, &security_); 35 return GetStringValue(key, value, &security_);
36 } else if (key == flimflam::kNetworkTechnologyProperty) { 36 } else if (key == flimflam::kNetworkTechnologyProperty) {
37 return GetStringValue(key, value, &technology_); 37 return GetStringValue(key, value, &technology_);
38 } else if (key == flimflam::kDeviceProperty) { 38 } else if (key == flimflam::kDeviceProperty) {
39 return GetStringValue(key, value, &device_path_); 39 return GetStringValue(key, value, &device_path_);
40 } else if (key == flimflam::kGuidProperty) {
41 return GetStringValue(key, value, &guid_);
40 } 42 }
41 return false; 43 return false;
42 } 44 }
43 45
44 bool NetworkState::IsConnectedState() const { 46 bool NetworkState::IsConnectedState() const {
45 return StateIsConnected(connection_state_); 47 return StateIsConnected(connection_state_);
46 } 48 }
47 49
48 bool NetworkState::IsConnectingState() const { 50 bool NetworkState::IsConnectingState() const {
49 return StateIsConnecting(connection_state_); 51 return StateIsConnecting(connection_state_);
50 } 52 }
51 53
52 // static 54 // static
53 bool NetworkState::StateIsConnected(const std::string& connection_state) { 55 bool NetworkState::StateIsConnected(const std::string& connection_state) {
54 return (connection_state == flimflam::kStateReady || 56 return (connection_state == flimflam::kStateReady ||
55 connection_state == flimflam::kStateOnline || 57 connection_state == flimflam::kStateOnline ||
56 connection_state == flimflam::kStatePortal); 58 connection_state == flimflam::kStatePortal);
57 } 59 }
58 60
59 // static 61 // static
60 bool NetworkState::StateIsConnecting(const std::string& connection_state) { 62 bool NetworkState::StateIsConnecting(const std::string& connection_state) {
61 return (connection_state == flimflam::kStateAssociation || 63 return (connection_state == flimflam::kStateAssociation ||
62 connection_state == flimflam::kStateConfiguration || 64 connection_state == flimflam::kStateConfiguration ||
63 connection_state == flimflam::kStateCarrier); 65 connection_state == flimflam::kStateCarrier);
64 } 66 }
65 67
66 } // namespace chromeos 68 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_state.h ('k') | chromeos/network/onc/onc_mapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698