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

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

Issue 16512003: Configure networks requiring a certificate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add localized Auth error messages Created 7 years, 6 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
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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 dictionary->SetStringWithoutPathExpansion(flimflam::kGuidProperty, guid_); 205 dictionary->SetStringWithoutPathExpansion(flimflam::kGuidProperty, guid_);
206 dictionary->SetStringWithoutPathExpansion(flimflam::kProfileProperty, 206 dictionary->SetStringWithoutPathExpansion(flimflam::kProfileProperty,
207 profile_path_); 207 profile_path_);
208 dictionary->SetBooleanWithoutPathExpansion( 208 dictionary->SetBooleanWithoutPathExpansion(
209 shill::kActivateOverNonCellularNetworkProperty, 209 shill::kActivateOverNonCellularNetworkProperty,
210 activate_over_non_cellular_networks_); 210 activate_over_non_cellular_networks_);
211 dictionary->SetBooleanWithoutPathExpansion(shill::kOutOfCreditsProperty, 211 dictionary->SetBooleanWithoutPathExpansion(shill::kOutOfCreditsProperty,
212 cellular_out_of_credits_); 212 cellular_out_of_credits_);
213 } 213 }
214 214
215 void NetworkState::GetConfigProperties(
216 base::DictionaryValue* dictionary) const {
217 dictionary->SetStringWithoutPathExpansion(flimflam::kNameProperty, name());
218 dictionary->SetStringWithoutPathExpansion(flimflam::kTypeProperty, type());
219 dictionary->SetStringWithoutPathExpansion(flimflam::kSecurityProperty,
220 security_);
pneubeck (no reviews) 2013/06/06 20:41:20 nit: security()
stevenjb 2013/06/07 03:44:58 Done.
221 dictionary->SetStringWithoutPathExpansion(flimflam::kGuidProperty, guid());
222 }
223
215 bool NetworkState::IsConnectedState() const { 224 bool NetworkState::IsConnectedState() const {
216 return StateIsConnected(connection_state_); 225 return StateIsConnected(connection_state_);
217 } 226 }
218 227
219 bool NetworkState::IsConnectingState() const { 228 bool NetworkState::IsConnectingState() const {
220 return StateIsConnecting(connection_state_); 229 return StateIsConnecting(connection_state_);
221 } 230 }
222 231
223 bool NetworkState::HasAuthenticationError() const { 232 bool NetworkState::HasAuthenticationError() const {
224 return (error_ == flimflam::kErrorBadPassphrase || 233 return (error_ == flimflam::kErrorBadPassphrase ||
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 connection_state == flimflam::kStateConfiguration || 310 connection_state == flimflam::kStateConfiguration ||
302 connection_state == flimflam::kStateCarrier); 311 connection_state == flimflam::kStateCarrier);
303 } 312 }
304 313
305 // static 314 // static
306 std::string NetworkState::IPConfigProperty(const char* key) { 315 std::string NetworkState::IPConfigProperty(const char* key) {
307 return base::StringPrintf("%s.%s", shill::kIPConfigProperty, key); 316 return base::StringPrintf("%s.%s", shill::kIPConfigProperty, key);
308 } 317 }
309 318
310 } // namespace chromeos 319 } // namespace chromeos
OLDNEW
« chromeos/network/network_connection_handler.cc ('K') | « chromeos/network/network_state.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698