| 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 #ifndef CHROMEOS_NETWORK_NETWORK_STATE_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_STATE_H_ |
| 6 #define CHROMEOS_NETWORK_NETWORK_STATE_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_STATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 const std::string& roaming() const { return roaming_; } | 71 const std::string& roaming() const { return roaming_; } |
| 72 bool activate_over_non_cellular_networks() const { | 72 bool activate_over_non_cellular_networks() const { |
| 73 return activate_over_non_cellular_networks_; | 73 return activate_over_non_cellular_networks_; |
| 74 } | 74 } |
| 75 bool cellular_out_of_credits() const { return cellular_out_of_credits_; } | 75 bool cellular_out_of_credits() const { return cellular_out_of_credits_; } |
| 76 const std::string& usage_url() const { return usage_url_; } | 76 const std::string& usage_url() const { return usage_url_; } |
| 77 const std::string& payment_url() const { return payment_url_; } | 77 const std::string& payment_url() const { return payment_url_; } |
| 78 const std::string& post_method() const { return post_method_; } | 78 const std::string& post_method() const { return post_method_; } |
| 79 const std::string& post_data() const { return post_data_; } | 79 const std::string& post_data() const { return post_data_; } |
| 80 | 80 |
| 81 bool HasCACertNSS() const { |
| 82 return has_eap_ca_cert_nss_ || has_openvpn_ca_cert_nss_ || |
| 83 has_ipsec_ca_cert_nss_; |
| 84 } |
| 85 |
| 81 bool IsConnectedState() const; | 86 bool IsConnectedState() const; |
| 82 bool IsConnectingState() const; | 87 bool IsConnectingState() const; |
| 83 | 88 |
| 84 bool IsManaged() const; | 89 bool IsManaged() const; |
| 85 bool IsShared() const; | 90 bool IsShared() const; |
| 86 | 91 |
| 87 // Returns a comma separated string of name servers. | 92 // Returns a comma separated string of name servers. |
| 88 std::string GetDnsServersAsString() const; | 93 std::string GetDnsServersAsString() const; |
| 89 | 94 |
| 90 // Converts the prefix length to a netmaks string. | 95 // Converts the prefix length to a netmaks string. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 std::string activation_state_; | 154 std::string activation_state_; |
| 150 std::string roaming_; | 155 std::string roaming_; |
| 151 bool activate_over_non_cellular_networks_; | 156 bool activate_over_non_cellular_networks_; |
| 152 bool cellular_out_of_credits_; | 157 bool cellular_out_of_credits_; |
| 153 // Cellular payment portal properties. | 158 // Cellular payment portal properties. |
| 154 std::string usage_url_; | 159 std::string usage_url_; |
| 155 std::string payment_url_; | 160 std::string payment_url_; |
| 156 std::string post_method_; | 161 std::string post_method_; |
| 157 std::string post_data_; | 162 std::string post_data_; |
| 158 | 163 |
| 164 // Whether a deprecated CaCertNSS property of this network is set. Required |
| 165 // for migration to PEM. |
| 166 bool has_eap_ca_cert_nss_; |
| 167 bool has_ipsec_ca_cert_nss_; |
| 168 bool has_openvpn_ca_cert_nss_; |
| 169 |
| 159 DISALLOW_COPY_AND_ASSIGN(NetworkState); | 170 DISALLOW_COPY_AND_ASSIGN(NetworkState); |
| 160 }; | 171 }; |
| 161 | 172 |
| 162 } // namespace chromeos | 173 } // namespace chromeos |
| 163 | 174 |
| 164 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ | 175 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ |
| OLD | NEW |