Index: chrome/browser/chromeos/cros/network_library.h |
diff --git a/chrome/browser/chromeos/cros/network_library.h b/chrome/browser/chromeos/cros/network_library.h |
index 7df2a9f859ce9d2afb8d6dbd981a8ccd23eb496e..935cd6e2a0b505c6781cd2d72a40abe32c0fc303 100644 |
--- a/chrome/browser/chromeos/cros/network_library.h |
+++ b/chrome/browser/chromeos/cros/network_library.h |
@@ -299,11 +299,14 @@ class Network { |
class TestApi { |
public: |
explicit TestApi(Network* network) : network_(network) {} |
- void SetConnected(bool connected) { |
- network_->set_connected(connected); |
+ void SetConnected() { |
+ network_->set_connected(); |
} |
- void SetConnecting(bool connecting) { |
- network_->set_connecting(connecting); |
+ void SetConnecting() { |
+ network_->set_connecting(); |
+ } |
+ void SetDisconnected() { |
+ network_->set_disconnected(); |
} |
private: |
Network* network_; |
@@ -407,7 +410,8 @@ class Network { |
state == STATE_PORTAL); |
} |
static bool IsConnectingState(ConnectionState state) { |
- return (state == STATE_ASSOCIATION || |
+ return (state == STATE_CONNECT_REQUESTED || |
+ state == STATE_ASSOCIATION || |
state == STATE_CONFIGURATION || |
state == STATE_CARRIER); |
} |
@@ -520,11 +524,14 @@ class Network { |
} |
void set_name(const std::string& name) { name_ = name; } |
void set_mode(ConnectionMode mode) { mode_ = mode; } |
- void set_connecting(bool connecting) { |
- state_ = (connecting ? STATE_ASSOCIATION : STATE_IDLE); |
+ void set_connecting() { |
+ state_ = STATE_CONNECT_REQUESTED; |
+ } |
+ void set_connected() { |
+ state_ = STATE_ONLINE; |
} |
- void set_connected(bool connected) { |
- state_ = (connected ? STATE_ONLINE : STATE_IDLE); |
+ void set_disconnected() { |
+ state_ = STATE_IDLE; |
} |
void set_connectable(bool connectable) { connectable_ = connectable; } |
void set_connection_started(bool started) { connection_started_ = started; } |