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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 cellular_plan_payment_time_).InHours() < kRecentPlanPaymentHours; | 614 cellular_plan_payment_time_).InHours() < kRecentPlanPaymentHours; |
615 } | 615 } |
616 | 616 |
617 const std::string& NetworkLibraryImplBase::GetCellularHomeCarrierId() const { | 617 const std::string& NetworkLibraryImplBase::GetCellularHomeCarrierId() const { |
618 const NetworkDevice* cellular = FindCellularDevice(); | 618 const NetworkDevice* cellular = FindCellularDevice(); |
619 if (cellular) | 619 if (cellular) |
620 return cellular->home_provider_id(); | 620 return cellular->home_provider_id(); |
621 return EmptyString(); | 621 return EmptyString(); |
622 } | 622 } |
623 | 623 |
| 624 bool NetworkLibraryImplBase::CellularDeviceUsesDirectActivation() const { |
| 625 const NetworkDevice* cellular = FindCellularDevice(); |
| 626 return cellular && (cellular->carrier() == shill::kCarrierSprint); |
| 627 } |
| 628 |
624 ///////////////////////////////////////////////////////////////////////////// | 629 ///////////////////////////////////////////////////////////////////////////// |
625 // Profiles. | 630 // Profiles. |
626 | 631 |
627 bool NetworkLibraryImplBase::HasProfileType(NetworkProfileType type) const { | 632 bool NetworkLibraryImplBase::HasProfileType(NetworkProfileType type) const { |
628 for (NetworkProfileList::const_iterator iter = profile_list_.begin(); | 633 for (NetworkProfileList::const_iterator iter = profile_list_.begin(); |
629 iter != profile_list_.end(); ++iter) { | 634 iter != profile_list_.end(); ++iter) { |
630 if ((*iter).type == type) | 635 if ((*iter).type == type) |
631 return true; | 636 return true; |
632 } | 637 } |
633 return false; | 638 return false; |
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1713 GetTpmInfo(); | 1718 GetTpmInfo(); |
1714 return tpm_slot_; | 1719 return tpm_slot_; |
1715 } | 1720 } |
1716 | 1721 |
1717 const std::string& NetworkLibraryImplBase::GetTpmPin() { | 1722 const std::string& NetworkLibraryImplBase::GetTpmPin() { |
1718 GetTpmInfo(); | 1723 GetTpmInfo(); |
1719 return tpm_pin_; | 1724 return tpm_pin_; |
1720 } | 1725 } |
1721 | 1726 |
1722 } // namespace chromeos | 1727 } // namespace chromeos |
OLD | NEW |