OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/chromeos/cros/network_library.h" | 5 #include "chrome/browser/chromeos/cros/network_library.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
(...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1364 } | 1364 } |
1365 | 1365 |
1366 // Create placeholder network for ethernet even if the service is not | 1366 // Create placeholder network for ethernet even if the service is not |
1367 // detected at this moment. | 1367 // detected at this moment. |
1368 if (!(*ethernet)) | 1368 if (!(*ethernet)) |
1369 (*ethernet) = new EthernetNetwork(); | 1369 (*ethernet) = new EthernetNetwork(); |
1370 | 1370 |
1371 DVLOG(1) << "Remembered networks:"; | 1371 DVLOG(1) << "Remembered networks:"; |
1372 for (int i = 0; i < system->remembered_service_size; i++) { | 1372 for (int i = 0; i < system->remembered_service_size; i++) { |
1373 const ServiceInfo* service = system->GetRememberedServiceInfo(i); | 1373 const ServiceInfo* service = system->GetRememberedServiceInfo(i); |
1374 // Only services marked as auto_connect are considered remembered | 1374 // Only services marked as favorite are considered remembered networks. |
1375 // networks. | |
1376 // TODO(chocobo): Don't add to remembered service if currently available. | 1375 // TODO(chocobo): Don't add to remembered service if currently available. |
1377 if (service->auto_connect) { | 1376 if (service->favorite) { |
1378 DVLOG(1) << " (" << service->type << ") " << service->name | 1377 DVLOG(1) << " (" << service->type << ") " << service->name |
1379 << " mode=" << service->mode | 1378 << " mode=" << service->mode |
1380 << " sec=" << service->security | 1379 << " sec=" << service->security |
1381 << " pass=" << service->passphrase | 1380 << " pass=" << service->passphrase |
1382 << " id=" << service->identity | 1381 << " id=" << service->identity |
1383 << " certpath=" << service->cert_path | 1382 << " certpath=" << service->cert_path |
| 1383 << " fav=" << service->favorite |
1384 << " auto=" << service->auto_connect; | 1384 << " auto=" << service->auto_connect; |
1385 if (service->type == TYPE_WIFI) { | 1385 if (service->type == TYPE_WIFI) { |
1386 remembered_wifi_networks->push_back(new WifiNetwork(service)); | 1386 remembered_wifi_networks->push_back(new WifiNetwork(service)); |
1387 } | 1387 } |
1388 } | 1388 } |
1389 } | 1389 } |
1390 } | 1390 } |
1391 | 1391 |
1392 void Init() { | 1392 void Init() { |
1393 // First, get the currently available networks. This data is cached | 1393 // First, get the currently available networks. This data is cached |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1839 return new NetworkLibraryStubImpl(); | 1839 return new NetworkLibraryStubImpl(); |
1840 else | 1840 else |
1841 return new NetworkLibraryImpl(); | 1841 return new NetworkLibraryImpl(); |
1842 } | 1842 } |
1843 | 1843 |
1844 } // namespace chromeos | 1844 } // namespace chromeos |
1845 | 1845 |
1846 // Allows InvokeLater without adding refcounting. This class is a Singleton and | 1846 // Allows InvokeLater without adding refcounting. This class is a Singleton and |
1847 // won't be deleted until it's last InvokeLater is run. | 1847 // won't be deleted until it's last InvokeLater is run. |
1848 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::NetworkLibraryImpl); | 1848 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::NetworkLibraryImpl); |
OLD | NEW |