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

Side by Side Diff: components/wifi_sync/network_state_helper_chromeos.cc

Issue 788633003: chromeos networking: move from security to securityclass property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@local-master
Patch Set: rebase, resolve conflicts, update new test data (shill_wifi_dhcp.json) Created 5 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/wifi_sync/network_state_helper_chromeos.h" 5 #include "components/wifi_sync/network_state_helper_chromeos.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chromeos/network/network_state.h" 8 #include "chromeos/network/network_state.h"
9 #include "chromeos/network/network_state_handler.h" 9 #include "chromeos/network/network_state_handler.h"
10 #include "chromeos/network/network_type_pattern.h" 10 #include "chromeos/network/network_type_pattern.h"
(...skipping 12 matching lines...) Expand all
23 true /* configured_only */, 23 true /* configured_only */,
24 false /* visible_only */, 24 false /* visible_only */,
25 0 /* unlimited result size */, 25 0 /* unlimited result size */,
26 &networks); 26 &networks);
27 27
28 auto credentials(WifiCredential::MakeSet()); 28 auto credentials(WifiCredential::MakeSet());
29 for (const chromeos::NetworkState* network : networks) { 29 for (const chromeos::NetworkState* network : networks) {
30 if (network->profile_path() != shill_profile_path) 30 if (network->profile_path() != shill_profile_path)
31 continue; 31 continue;
32 32
33 // TODO(quiche): Switch away from network->security(), once we have
34 // a security_class() field in NetworkState.
35 //
36 // TODO(quiche): Fill in the actual passphrase via an asynchronous 33 // TODO(quiche): Fill in the actual passphrase via an asynchronous
37 // call to a chromeos::NetworkConfigurationHandler instance's 34 // call to a chromeos::NetworkConfigurationHandler instance's
38 // GetProperties method. 35 // GetProperties method.
39 credentials.insert( 36 credentials.insert(
40 WifiCredential(network->raw_ssid(), 37 WifiCredential(
41 WifiSecurityClassFromShillSecurity(network->security()), 38 network->raw_ssid(),
42 "" /* empty passphrase */)); 39 WifiSecurityClassFromShillSecurity(network->security_class()),
40 "" /* empty passphrase */));
43 } 41 }
44 return credentials; 42 return credentials;
45 } 43 }
46 44
47 } // namespace wifi_sync 45 } // namespace wifi_sync
OLDNEW
« no previous file with comments | « chromeos/test/data/network/translation_of_shill_wifi_wpa1.onc ('k') | ui/chromeos/network/network_connect.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698