| 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 #ifndef CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 } | 622 } |
| 623 const std::string& operator_name() const { return operator_name_; } | 623 const std::string& operator_name() const { return operator_name_; } |
| 624 const std::string& operator_code() const { return operator_code_; } | 624 const std::string& operator_code() const { return operator_code_; } |
| 625 const std::string& operator_country() const { return operator_country_; } | 625 const std::string& operator_country() const { return operator_country_; } |
| 626 const std::string& payment_url() const { return payment_url_; } | 626 const std::string& payment_url() const { return payment_url_; } |
| 627 const std::string& usage_url() const { return usage_url_; } | 627 const std::string& usage_url() const { return usage_url_; } |
| 628 DataLeft data_left() const { return data_left_; } | 628 DataLeft data_left() const { return data_left_; } |
| 629 const Apn& apn() const { return apn_; } | 629 const Apn& apn() const { return apn_; } |
| 630 const Apn& last_good_apn() const { return last_good_apn_; } | 630 const Apn& last_good_apn() const { return last_good_apn_; } |
| 631 void SetApn(const Apn& apn); | 631 void SetApn(const Apn& apn); |
| 632 |
| 633 // Returns true if network supports activation. |
| 634 // Current implementation returns same as SupportsDataPlan(). |
| 635 bool SupportsActivation() const; |
| 636 |
| 637 // Returns true if one of the usage_url_ / payment_url_ (or both) is defined. |
| 632 bool SupportsDataPlan() const; | 638 bool SupportsDataPlan() const; |
| 633 | 639 |
| 634 // Misc. | 640 // Misc. |
| 635 bool is_gsm() const { | 641 bool is_gsm() const { |
| 636 return network_technology_ != NETWORK_TECHNOLOGY_EVDO && | 642 return network_technology_ != NETWORK_TECHNOLOGY_EVDO && |
| 637 network_technology_ != NETWORK_TECHNOLOGY_1XRTT && | 643 network_technology_ != NETWORK_TECHNOLOGY_1XRTT && |
| 638 network_technology_ != NETWORK_TECHNOLOGY_UNKNOWN; | 644 network_technology_ != NETWORK_TECHNOLOGY_UNKNOWN; |
| 639 } | 645 } |
| 640 | 646 |
| 641 // Return a string representation of network technology. | 647 // Return a string representation of network technology. |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1230 virtual void SetIPConfig(const NetworkIPConfig& ipconfig) = 0; | 1236 virtual void SetIPConfig(const NetworkIPConfig& ipconfig) = 0; |
| 1231 | 1237 |
| 1232 // Factory function, creates a new instance and returns ownership. | 1238 // Factory function, creates a new instance and returns ownership. |
| 1233 // For normal usage, access the singleton via CrosLibrary::Get(). | 1239 // For normal usage, access the singleton via CrosLibrary::Get(). |
| 1234 static NetworkLibrary* GetImpl(bool stub); | 1240 static NetworkLibrary* GetImpl(bool stub); |
| 1235 }; | 1241 }; |
| 1236 | 1242 |
| 1237 } // namespace chromeos | 1243 } // namespace chromeos |
| 1238 | 1244 |
| 1239 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 1245 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
| OLD | NEW |