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