| OLD | NEW |
| 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 "chrome/browser/chromeos/cros/network_library_impl_cros.h" | 5 #include "chrome/browser/chromeos/cros/network_library_impl_cros.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/json/json_writer.h" // for debug output only. | 9 #include "base/json/json_writer.h" // for debug output only. |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 if (wimax_enabled()) | 456 if (wimax_enabled()) |
| 457 CrosRequestNetworkScan(flimflam::kTypeWimax); | 457 CrosRequestNetworkScan(flimflam::kTypeWimax); |
| 458 | 458 |
| 459 // Make sure all Manager info is up to date. This will also update | 459 // Make sure all Manager info is up to date. This will also update |
| 460 // remembered networks and visible services. | 460 // remembered networks and visible services. |
| 461 CrosRequestNetworkManagerProperties( | 461 CrosRequestNetworkManagerProperties( |
| 462 base::Bind(&NetworkLibraryImplCros::NetworkManagerUpdate, | 462 base::Bind(&NetworkLibraryImplCros::NetworkManagerUpdate, |
| 463 weak_ptr_factory_.GetWeakPtr())); | 463 weak_ptr_factory_.GetWeakPtr())); |
| 464 } | 464 } |
| 465 | 465 |
| 466 bool NetworkLibraryImplCros::GetWifiAccessPoints( | |
| 467 WifiAccessPointVector* result) { | |
| 468 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | |
| 469 return CrosGetWifiAccessPoints(result); | |
| 470 } | |
| 471 | |
| 472 void NetworkLibraryImplCros::RefreshIPConfig(Network* network) { | 466 void NetworkLibraryImplCros::RefreshIPConfig(Network* network) { |
| 473 DCHECK(network); | 467 DCHECK(network); |
| 474 CrosRequestNetworkDeviceProperties( | 468 CrosRequestNetworkDeviceProperties( |
| 475 network->device_path(), | 469 network->device_path(), |
| 476 base::Bind(&NetworkLibraryImplCros::RefreshIPConfigCallback, | 470 base::Bind(&NetworkLibraryImplCros::RefreshIPConfigCallback, |
| 477 weak_ptr_factory_.GetWeakPtr())); | 471 weak_ptr_factory_.GetWeakPtr())); |
| 478 } | 472 } |
| 479 | 473 |
| 480 void NetworkLibraryImplCros::RefreshIPConfigCallback( | 474 void NetworkLibraryImplCros::RefreshIPConfigCallback( |
| 481 const std::string& device_path, | 475 const std::string& device_path, |
| (...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1380 RefreshIPConfig(network); | 1374 RefreshIPConfig(network); |
| 1381 } | 1375 } |
| 1382 | 1376 |
| 1383 // static | 1377 // static |
| 1384 bool NetworkLibraryImplCros::AreProfilePathsEqual(const NetworkProfile& a, | 1378 bool NetworkLibraryImplCros::AreProfilePathsEqual(const NetworkProfile& a, |
| 1385 const NetworkProfile& b) { | 1379 const NetworkProfile& b) { |
| 1386 return a.path == b.path; | 1380 return a.path == b.path; |
| 1387 } | 1381 } |
| 1388 | 1382 |
| 1389 } // namespace chromeos | 1383 } // namespace chromeos |
| OLD | NEW |