Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(661)

Unified Diff: chrome/browser/chromeos/cros/network_library.h

Issue 4976007: Don't allow connection to networks that are not connected.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/cros/network_library.h
===================================================================
--- chrome/browser/chromeos/cros/network_library.h (revision 66336)
+++ chrome/browser/chromeos/cros/network_library.h (working copy)
@@ -49,6 +49,9 @@
state_ == STATE_IDLE; }
ConnectionError error() const { return error_; }
ConnectionState state() const { return state_; }
+ // Is this network connectable. Some networks are not yet ready to be
+ // connected. For example, an 8021X network without certificates.
+ bool connectable() const { return connectable_; }
// Is this the active network, i.e, the one through which
// network traffic is being routed? A network can be connected,
// but not be carrying traffic.
@@ -68,6 +71,7 @@
: type_(TYPE_UNKNOWN),
state_(STATE_UNKNOWN),
error_(ERROR_UNKNOWN),
+ connectable_(true),
is_active_(false) {}
explicit Network(const Network& network);
explicit Network(const ServiceInfo* service);
@@ -79,6 +83,7 @@
ConnectionType type_;
ConnectionState state_;
ConnectionError error_;
+ bool connectable_;
bool is_active_;
private:
@@ -89,6 +94,7 @@
void set_connected(bool connected) { state_ = (connected ?
STATE_READY : STATE_IDLE); }
void set_state(ConnectionState state) { state_ = state; }
+ void set_connectable(bool connectable) { connectable_ = connectable; }
void set_active(bool is_active) { is_active_ = is_active; }
friend class NetworkLibraryImpl;

Powered by Google App Engine
This is Rietveld 408576698