| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 // Returns true if the network properties are stored in a user profile. | 93 // Returns true if the network properties are stored in a user profile. |
| 94 bool IsPrivate() const; | 94 bool IsPrivate() const; |
| 95 | 95 |
| 96 // Returns a comma separated string of name servers. | 96 // Returns a comma separated string of name servers. |
| 97 std::string GetDnsServersAsString() const; | 97 std::string GetDnsServersAsString() const; |
| 98 | 98 |
| 99 // Converts the prefix length to a netmask string. | 99 // Converts the prefix length to a netmask string. |
| 100 std::string GetNetmask() const; | 100 std::string GetNetmask() const; |
| 101 | 101 |
| 102 // Set the GUID. Called exclusively by NetworkStateHandler. |
| 103 void SetGuid(const std::string& guid); |
| 104 |
| 102 // Helpers (used e.g. when a state or error is cached) | 105 // Helpers (used e.g. when a state or error is cached) |
| 103 static bool StateIsConnected(const std::string& connection_state); | 106 static bool StateIsConnected(const std::string& connection_state); |
| 104 static bool StateIsConnecting(const std::string& connection_state); | 107 static bool StateIsConnecting(const std::string& connection_state); |
| 105 static bool ErrorIsValid(const std::string& error); | 108 static bool ErrorIsValid(const std::string& error); |
| 106 | 109 |
| 107 private: | 110 private: |
| 108 friend class MobileActivatorTest; | 111 friend class MobileActivatorTest; |
| 109 friend class NetworkStateHandler; | 112 friend class NetworkStateHandler; |
| 110 friend class NetworkChangeNotifierChromeosUpdateTest; | 113 friend class NetworkChangeNotifierChromeosUpdateTest; |
| 111 | 114 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 // Whether a deprecated CaCertNSS property of this network is set. Required | 161 // Whether a deprecated CaCertNSS property of this network is set. Required |
| 159 // for migration to PEM. | 162 // for migration to PEM. |
| 160 bool has_ca_cert_nss_; | 163 bool has_ca_cert_nss_; |
| 161 | 164 |
| 162 DISALLOW_COPY_AND_ASSIGN(NetworkState); | 165 DISALLOW_COPY_AND_ASSIGN(NetworkState); |
| 163 }; | 166 }; |
| 164 | 167 |
| 165 } // namespace chromeos | 168 } // namespace chromeos |
| 166 | 169 |
| 167 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ | 170 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ |
| OLD | NEW |