| 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 "chromeos/network/managed_state.h" | 8 #include "chromeos/network/managed_state.h" |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 const std::string& error() const { return error_; } | 42 const std::string& error() const { return error_; } |
| 43 // Wireless property accessors | 43 // Wireless property accessors |
| 44 int signal_strength() const { return signal_strength_; } | 44 int signal_strength() const { return signal_strength_; } |
| 45 // Cellular property accessors | 45 // Cellular property accessors |
| 46 const std::string& technology() const { return technology_; } | 46 const std::string& technology() const { return technology_; } |
| 47 const std::string& activation_state() const { return activation_state_; } | 47 const std::string& activation_state() const { return activation_state_; } |
| 48 const std::string& roaming() const { return roaming_; } | 48 const std::string& roaming() const { return roaming_; } |
| 49 bool activate_over_non_cellular_networks() const { | 49 bool activate_over_non_cellular_networks() const { |
| 50 return activate_over_non_cellular_networks_; | 50 return activate_over_non_cellular_networks_; |
| 51 } | 51 } |
| 52 bool cellular_out_of_credits() const { return cellular_out_of_credits_; } |
| 52 | 53 |
| 53 bool IsConnectedState() const; | 54 bool IsConnectedState() const; |
| 54 bool IsConnectingState() const; | 55 bool IsConnectingState() const; |
| 55 | 56 |
| 56 // Helpers (used e.g. when a state is cached) | 57 // Helpers (used e.g. when a state is cached) |
| 57 static bool StateIsConnected(const std::string& connection_state); | 58 static bool StateIsConnected(const std::string& connection_state); |
| 58 static bool StateIsConnecting(const std::string& connection_state); | 59 static bool StateIsConnecting(const std::string& connection_state); |
| 59 | 60 |
| 60 private: | 61 private: |
| 61 friend class NetworkStateHandler; | 62 friend class NetworkStateHandler; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 73 std::string ip_address_; | 74 std::string ip_address_; |
| 74 std::string connection_state_; | 75 std::string connection_state_; |
| 75 std::string error_; | 76 std::string error_; |
| 76 // Wireless properties | 77 // Wireless properties |
| 77 int signal_strength_; | 78 int signal_strength_; |
| 78 // Cellular properties | 79 // Cellular properties |
| 79 std::string technology_; | 80 std::string technology_; |
| 80 std::string activation_state_; | 81 std::string activation_state_; |
| 81 std::string roaming_; | 82 std::string roaming_; |
| 82 bool activate_over_non_cellular_networks_; | 83 bool activate_over_non_cellular_networks_; |
| 84 bool cellular_out_of_credits_; |
| 83 | 85 |
| 84 DISALLOW_COPY_AND_ASSIGN(NetworkState); | 86 DISALLOW_COPY_AND_ASSIGN(NetworkState); |
| 85 }; | 87 }; |
| 86 | 88 |
| 87 } // namespace chromeos | 89 } // namespace chromeos |
| 88 | 90 |
| 89 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ | 91 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ |
| OLD | NEW |