| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 std::string GetNetmask() const; | 119 std::string GetNetmask() const; |
| 120 | 120 |
| 121 // Returns a specifier for identifying this network in the absence of a GUID. | 121 // Returns a specifier for identifying this network in the absence of a GUID. |
| 122 // This should only be used by NetworkStateHandler for keeping track of | 122 // This should only be used by NetworkStateHandler for keeping track of |
| 123 // GUIDs assigned to unsaved networks. | 123 // GUIDs assigned to unsaved networks. |
| 124 std::string GetSpecifier() const; | 124 std::string GetSpecifier() const; |
| 125 | 125 |
| 126 // Set the GUID. Called exclusively by NetworkStateHandler. | 126 // Set the GUID. Called exclusively by NetworkStateHandler. |
| 127 void SetGuid(const std::string& guid); | 127 void SetGuid(const std::string& guid); |
| 128 | 128 |
| 129 // Returns |error_| if valid, otherwise returns |last_error_|. | |
| 130 std::string GetErrorState() const; | |
| 131 | |
| 132 // Helpers (used e.g. when a state, error, or shill dictionary is cached) | 129 // Helpers (used e.g. when a state, error, or shill dictionary is cached) |
| 133 static bool StateIsConnected(const std::string& connection_state); | 130 static bool StateIsConnected(const std::string& connection_state); |
| 134 static bool StateIsConnecting(const std::string& connection_state); | 131 static bool StateIsConnecting(const std::string& connection_state); |
| 135 static bool NetworkStateIsCaptivePortal( | 132 static bool NetworkStateIsCaptivePortal( |
| 136 const base::DictionaryValue& shill_properties); | 133 const base::DictionaryValue& shill_properties); |
| 137 static bool ErrorIsValid(const std::string& error); | 134 static bool ErrorIsValid(const std::string& error); |
| 138 | 135 |
| 139 private: | 136 private: |
| 140 friend class MobileActivatorTest; | 137 friend class MobileActivatorTest; |
| 141 friend class NetworkStateHandler; | 138 friend class NetworkStateHandler; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 // TODO(pneubeck): Remove this once (Managed)NetworkConfigurationHandler | 194 // TODO(pneubeck): Remove this once (Managed)NetworkConfigurationHandler |
| 198 // provides proxy configuration. crbug.com/241775 | 195 // provides proxy configuration. crbug.com/241775 |
| 199 base::DictionaryValue proxy_config_; | 196 base::DictionaryValue proxy_config_; |
| 200 | 197 |
| 201 DISALLOW_COPY_AND_ASSIGN(NetworkState); | 198 DISALLOW_COPY_AND_ASSIGN(NetworkState); |
| 202 }; | 199 }; |
| 203 | 200 |
| 204 } // namespace chromeos | 201 } // namespace chromeos |
| 205 | 202 |
| 206 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ | 203 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ |
| OLD | NEW |