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

Unified Diff: chromeos/network/network_state.h

Issue 873713004: Introduce NetworkState::is_captive_portal() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback, unit test Created 5 years, 11 months 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
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/network_state_informer.cc ('k') | chromeos/network/network_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/network_state.h
diff --git a/chromeos/network/network_state.h b/chromeos/network/network_state.h
index 403daf7f7a976a7130f3b46e92f3eefc4103aa52..e8e65616ff9f90a7a103a11e56c00865cfe630f1 100644
--- a/chromeos/network/network_state.h
+++ b/chromeos/network/network_state.h
@@ -76,6 +76,7 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
// Wireless property accessors
bool connectable() const { return connectable_; }
+ bool is_captive_portal() const { return is_captive_portal_; }
int signal_strength() const { return signal_strength_; }
// Wifi property accessors
@@ -116,9 +117,11 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
// Set the GUID. Called exclusively by NetworkStateHandler.
void SetGuid(const std::string& guid);
- // Helpers (used e.g. when a state or error is cached)
+ // Helpers (used e.g. when a state, error, or shill dictionary is cached)
static bool StateIsConnected(const std::string& connection_state);
static bool StateIsConnecting(const std::string& connection_state);
+ static bool NetworkStateIsCaptivePortal(
+ const base::DictionaryValue& shill_properties);
static bool ErrorIsValid(const std::string& error);
private:
@@ -143,7 +146,6 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
std::string connection_state_;
std::string profile_path_;
std::vector<uint8_t> raw_ssid_; // Unknown encoding. Not necessarily UTF-8.
- bool connectable_;
// Reflects the current Shill Service.Error property. This might get cleared
// by Shill shortly after a failure.
@@ -163,6 +165,8 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
GURL web_proxy_auto_discovery_url_;
// Wireless properties, used for icons and Connect logic.
+ bool connectable_;
+ bool is_captive_portal_;
int signal_strength_;
// Cellular properties, used for icons, Connect, and Activation.
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/network_state_informer.cc ('k') | chromeos/network/network_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698