| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/i18n/icu_encoding_detection.h" | 10 #include "base/i18n/icu_encoding_detection.h" |
| (...skipping 1878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1889 value.SetString(kApnProperty, apn.apn); | 1889 value.SetString(kApnProperty, apn.apn); |
| 1890 value.SetString(kNetworkIdProperty, apn.network_id); | 1890 value.SetString(kNetworkIdProperty, apn.network_id); |
| 1891 value.SetString(kUsernameProperty, apn.username); | 1891 value.SetString(kUsernameProperty, apn.username); |
| 1892 value.SetString(kPasswordProperty, apn.password); | 1892 value.SetString(kPasswordProperty, apn.password); |
| 1893 SetValueProperty(kCellularApnProperty, &value); | 1893 SetValueProperty(kCellularApnProperty, &value); |
| 1894 } else { | 1894 } else { |
| 1895 ClearProperty(kCellularApnProperty); | 1895 ClearProperty(kCellularApnProperty); |
| 1896 } | 1896 } |
| 1897 } | 1897 } |
| 1898 | 1898 |
| 1899 bool CellularNetwork::SupportsActivation() const { |
| 1900 return SupportsDataPlan(); |
| 1901 } |
| 1902 |
| 1899 bool CellularNetwork::SupportsDataPlan() const { | 1903 bool CellularNetwork::SupportsDataPlan() const { |
| 1900 // TODO(nkostylev): Are there cases when only one of this is defined? | 1904 // TODO(nkostylev): Are there cases when only one of this is defined? |
| 1901 return !usage_url().empty() || !payment_url().empty(); | 1905 return !usage_url().empty() || !payment_url().empty(); |
| 1902 } | 1906 } |
| 1903 | 1907 |
| 1904 std::string CellularNetwork::GetNetworkTechnologyString() const { | 1908 std::string CellularNetwork::GetNetworkTechnologyString() const { |
| 1905 // No need to localize these cellular technology abbreviations. | 1909 // No need to localize these cellular technology abbreviations. |
| 1906 switch (network_technology_) { | 1910 switch (network_technology_) { |
| 1907 case NETWORK_TECHNOLOGY_1XRTT: | 1911 case NETWORK_TECHNOLOGY_1XRTT: |
| 1908 return "1xRTT"; | 1912 return "1xRTT"; |
| (...skipping 3269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5178 return new NetworkLibraryStubImpl(); | 5182 return new NetworkLibraryStubImpl(); |
| 5179 else | 5183 else |
| 5180 return new NetworkLibraryImpl(); | 5184 return new NetworkLibraryImpl(); |
| 5181 } | 5185 } |
| 5182 | 5186 |
| 5183 } // namespace chromeos | 5187 } // namespace chromeos |
| 5184 | 5188 |
| 5185 // Allows InvokeLater without adding refcounting. This class is a Singleton and | 5189 // Allows InvokeLater without adding refcounting. This class is a Singleton and |
| 5186 // won't be deleted until it's last InvokeLater is run. | 5190 // won't be deleted until it's last InvokeLater is run. |
| 5187 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::NetworkLibraryImpl); | 5191 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::NetworkLibraryImpl); |
| OLD | NEW |