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

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

Issue 14134007: NetworkPortalDetector/NetworkStateInformer: Switch over to use NetworkStateHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 7 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') | no next file » | 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/i18n/icu_encoding_detection.h" 7 #include "base/i18n/icu_encoding_detection.h"
8 #include "base/i18n/icu_string_conversions.h" 8 #include "base/i18n/icu_string_conversions.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } else if (key == flimflam::kPriorityProperty) { 102 } else if (key == flimflam::kPriorityProperty) {
103 return GetIntegerValue(key, value, &priority_); 103 return GetIntegerValue(key, value, &priority_);
104 } else if (key == flimflam::kNetworkTechnologyProperty) { 104 } else if (key == flimflam::kNetworkTechnologyProperty) {
105 return GetStringValue(key, value, &technology_); 105 return GetStringValue(key, value, &technology_);
106 } else if (key == flimflam::kDeviceProperty) { 106 } else if (key == flimflam::kDeviceProperty) {
107 return GetStringValue(key, value, &device_path_); 107 return GetStringValue(key, value, &device_path_);
108 } else if (key == flimflam::kGuidProperty) { 108 } else if (key == flimflam::kGuidProperty) {
109 return GetStringValue(key, value, &guid_); 109 return GetStringValue(key, value, &guid_);
110 } else if (key == flimflam::kProfileProperty) { 110 } else if (key == flimflam::kProfileProperty) {
111 return GetStringValue(key, value, &profile_path_); 111 return GetStringValue(key, value, &profile_path_);
112 } else if (key == flimflam::kProxyConfigProperty) {
113 return GetStringValue(key, value, &proxy_config_);
112 } else if (key == shill::kActivateOverNonCellularNetworkProperty) { 114 } else if (key == shill::kActivateOverNonCellularNetworkProperty) {
113 return GetBooleanValue(key, value, &activate_over_non_cellular_networks_); 115 return GetBooleanValue(key, value, &activate_over_non_cellular_networks_);
114 } else if (key == shill::kOutOfCreditsProperty) { 116 } else if (key == shill::kOutOfCreditsProperty) {
115 return GetBooleanValue(key, value, &cellular_out_of_credits_); 117 return GetBooleanValue(key, value, &cellular_out_of_credits_);
116 } else if (key == flimflam::kWifiHexSsid) { 118 } else if (key == flimflam::kWifiHexSsid) {
117 return GetStringValue(key, value, &hex_ssid_); 119 return GetStringValue(key, value, &hex_ssid_);
118 } else if (key == flimflam::kCountryProperty) { 120 } else if (key == flimflam::kCountryProperty) {
119 // TODO(stevenjb): This is currently experimental. If we find a case where 121 // TODO(stevenjb): This is currently experimental. If we find a case where
120 // base::DetectEncoding() fails in UpdateName(), where country_code_ is 122 // base::DetectEncoding() fails in UpdateName(), where country_code_ is
121 // set, figure out whether we can use country_code_ with ConvertToUtf8(). 123 // set, figure out whether we can use country_code_ with ConvertToUtf8().
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 dictionary->SetIntegerWithoutPathExpansion(flimflam::kPriorityProperty, 168 dictionary->SetIntegerWithoutPathExpansion(flimflam::kPriorityProperty,
167 priority_); 169 priority_);
168 dictionary->SetStringWithoutPathExpansion( 170 dictionary->SetStringWithoutPathExpansion(
169 flimflam::kNetworkTechnologyProperty, 171 flimflam::kNetworkTechnologyProperty,
170 technology_); 172 technology_);
171 dictionary->SetStringWithoutPathExpansion(flimflam::kDeviceProperty, 173 dictionary->SetStringWithoutPathExpansion(flimflam::kDeviceProperty,
172 device_path_); 174 device_path_);
173 dictionary->SetStringWithoutPathExpansion(flimflam::kGuidProperty, guid_); 175 dictionary->SetStringWithoutPathExpansion(flimflam::kGuidProperty, guid_);
174 dictionary->SetStringWithoutPathExpansion(flimflam::kProfileProperty, 176 dictionary->SetStringWithoutPathExpansion(flimflam::kProfileProperty,
175 profile_path_); 177 profile_path_);
178 dictionary->SetStringWithoutPathExpansion(flimflam::kProxyConfigProperty,
179 proxy_config_);
176 dictionary->SetBooleanWithoutPathExpansion( 180 dictionary->SetBooleanWithoutPathExpansion(
177 shill::kActivateOverNonCellularNetworkProperty, 181 shill::kActivateOverNonCellularNetworkProperty,
178 activate_over_non_cellular_networks_); 182 activate_over_non_cellular_networks_);
179 dictionary->SetBooleanWithoutPathExpansion(shill::kOutOfCreditsProperty, 183 dictionary->SetBooleanWithoutPathExpansion(shill::kOutOfCreditsProperty,
180 cellular_out_of_credits_); 184 cellular_out_of_credits_);
181 } 185 }
182 186
183 bool NetworkState::IsConnectedState() const { 187 bool NetworkState::IsConnectedState() const {
184 return StateIsConnected(connection_state_); 188 return StateIsConnected(connection_state_);
185 } 189 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 connection_state == flimflam::kStateConfiguration || 264 connection_state == flimflam::kStateConfiguration ||
261 connection_state == flimflam::kStateCarrier); 265 connection_state == flimflam::kStateCarrier);
262 } 266 }
263 267
264 // static 268 // static
265 std::string NetworkState::IPConfigProperty(const char* key) { 269 std::string NetworkState::IPConfigProperty(const char* key) {
266 return base::StringPrintf("%s.%s", shill::kIPConfigProperty, key); 270 return base::StringPrintf("%s.%s", shill::kIPConfigProperty, key);
267 } 271 }
268 272
269 } // namespace chromeos 273 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_state.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698