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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 // Returns true if the ONC source is a device or user policy. | 85 // Returns true if the ONC source is a device or user policy. |
86 bool IsManaged() const; | 86 bool IsManaged() const; |
87 | 87 |
88 // Returns true if the network properties are stored in a user profile. | 88 // Returns true if the network properties are stored in a user profile. |
89 bool IsPrivate() const; | 89 bool IsPrivate() const; |
90 | 90 |
91 // Returns a comma separated string of name servers. | 91 // Returns a comma separated string of name servers. |
92 std::string GetDnsServersAsString() const; | 92 std::string GetDnsServersAsString() const; |
93 | 93 |
94 // Converts the prefix length to a network string. | 94 // Converts the prefix length to a netmask string. |
95 std::string GetNetmask() const; | 95 std::string GetNetmask() const; |
96 | 96 |
97 // Helpers (used e.g. when a state is cached) | 97 // Helpers (used e.g. when a state is cached) |
98 static bool StateIsConnected(const std::string& connection_state); | 98 static bool StateIsConnected(const std::string& connection_state); |
99 static bool StateIsConnecting(const std::string& connection_state); | 99 static bool StateIsConnecting(const std::string& connection_state); |
100 | 100 |
101 // Helper to return a full prefixed version of an IPConfig property | 101 // Helper to return a full prefixed version of an IPConfig property |
102 // key. | 102 // key. |
103 static std::string IPConfigProperty(const char* key); | 103 static std::string IPConfigProperty(const char* key); |
104 | 104 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 // Whether a deprecated CaCertNSS property of this network is set. Required | 161 // Whether a deprecated CaCertNSS property of this network is set. Required |
162 // for migration to PEM. | 162 // for migration to PEM. |
163 bool has_ca_cert_nss_; | 163 bool has_ca_cert_nss_; |
164 | 164 |
165 DISALLOW_COPY_AND_ASSIGN(NetworkState); | 165 DISALLOW_COPY_AND_ASSIGN(NetworkState); |
166 }; | 166 }; |
167 | 167 |
168 } // namespace chromeos | 168 } // namespace chromeos |
169 | 169 |
170 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ | 170 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ |
OLD | NEW |