| 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_base.h" | 5 #include "chrome/browser/chromeos/cros/network_library_impl_base.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 if (uninitialized_devices_ & (1 << TYPE_CELLULAR)) | 454 if (uninitialized_devices_ & (1 << TYPE_CELLULAR)) |
| 455 return true; | 455 return true; |
| 456 const NetworkDevice* device = FindDeviceByType(TYPE_CELLULAR); | 456 const NetworkDevice* device = FindDeviceByType(TYPE_CELLULAR); |
| 457 if (device && device->scanning()) | 457 if (device && device->scanning()) |
| 458 return true; | 458 return true; |
| 459 return false; | 459 return false; |
| 460 } | 460 } |
| 461 | 461 |
| 462 bool NetworkLibraryImplBase::offline_mode() const { return offline_mode_; } | 462 bool NetworkLibraryImplBase::offline_mode() const { return offline_mode_; } |
| 463 | 463 |
| 464 std::string NetworkLibraryImplBase::GetCheckPortalList() const { | |
| 465 return check_portal_list_; | |
| 466 } | |
| 467 | |
| 468 // Returns the IP address for the active network. | 464 // Returns the IP address for the active network. |
| 469 // TODO(stevenjb): Fix this for VPNs. See chromium-os:13972. | 465 // TODO(stevenjb): Fix this for VPNs. See chromium-os:13972. |
| 470 const std::string& NetworkLibraryImplBase::IPAddress() const { | 466 const std::string& NetworkLibraryImplBase::IPAddress() const { |
| 471 const Network* result = active_network(); | 467 const Network* result = active_network(); |
| 472 if (!result) | 468 if (!result) |
| 473 result = connected_network(); // happens if we are connected to a VPN. | 469 result = connected_network(); // happens if we are connected to a VPN. |
| 474 if (!result) | 470 if (!result) |
| 475 result = ethernet_; // Use non active ethernet addr if no active network. | 471 result = ethernet_; // Use non active ethernet addr if no active network. |
| 476 if (result) | 472 if (result) |
| 477 return result->ip_address(); | 473 return result->ip_address(); |
| (...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1724 GetTpmInfo(); | 1720 GetTpmInfo(); |
| 1725 return tpm_slot_; | 1721 return tpm_slot_; |
| 1726 } | 1722 } |
| 1727 | 1723 |
| 1728 const std::string& NetworkLibraryImplBase::GetTpmPin() { | 1724 const std::string& NetworkLibraryImplBase::GetTpmPin() { |
| 1729 GetTpmInfo(); | 1725 GetTpmInfo(); |
| 1730 return tpm_pin_; | 1726 return tpm_pin_; |
| 1731 } | 1727 } |
| 1732 | 1728 |
| 1733 } // namespace chromeos | 1729 } // namespace chromeos |
| OLD | NEW |