summaryrefslogtreecommitdiffstats
path: root/chromeos
diff options
context:
space:
mode:
authorgauravsh@chromium.org <gauravsh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-22 00:18:40 +0000
committergauravsh@chromium.org <gauravsh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-22 00:18:40 +0000
commitb93ea39a7c68d809112e8d168c8aa18517f21555 (patch)
tree424d532742a213637025e007e2777edc1ff628ef /chromeos
parentf80aa37e487d5110edc097bfd0c33d4b17637eb2 (diff)
downloadchromium_src-b93ea39a7c68d809112e8d168c8aa18517f21555.zip
chromium_src-b93ea39a7c68d809112e8d168c8aa18517f21555.tar.gz
chromium_src-b93ea39a7c68d809112e8d168c8aa18517f21555.tar.bz2
NetworkPortalDetector/NetworkStateInformer: Switch over to use NetworkStateHandler
[reland of 200968 after nkostylev's fix to remove the NOTREACHED in WebUIScreenLocker::IsSigninProgress crbug.com/241548] This removes the direct network library dependency for NetworkPortalDetector, NetworkStateInformer, and SigninScreenHandler. UpdateScreen and LocallyManagedUserCreationHandler no longer depend on NetworkLibrary as well. Also change active -> default network in these to be consistent with terminology we use in NetworkStateHandler. BUG=189093,189009 Review URL: https://chromiumcodereview.appspot.com/15359008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201400 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos')
-rw-r--r--chromeos/dbus/shill_service_client_stub.cc9
-rw-r--r--chromeos/network/network_state.cc4
-rw-r--r--chromeos/network/network_state.h2
3 files changed, 12 insertions, 3 deletions
diff --git a/chromeos/dbus/shill_service_client_stub.cc b/chromeos/dbus/shill_service_client_stub.cc
index af4245c..d4e131d 100644
--- a/chromeos/dbus/shill_service_client_stub.cc
+++ b/chromeos/dbus/shill_service_client_stub.cc
@@ -106,10 +106,13 @@ void ShillServiceClientStub::SetProperty(const dbus::ObjectPath& service_path,
return;
}
if (name == flimflam::kStateProperty) {
- // If we connect to a service, then we move it to the top of the list in
- // the manager client.
+ // If the service went into a connected state, then move it to the top of
+ // the list in the manager client.
+ // TODO(gauravsh): Generalize to sort services properly to allow for testing
+ // more complex scenarios.
std::string state;
- if (value.GetAsString(&state) && state == flimflam::kStateOnline) {
+ if (value.GetAsString(&state) && (state == flimflam::kStateOnline ||
+ state == flimflam::kStatePortal)) {
ShillManagerClient* manager_client =
DBusThreadManager::Get()->GetShillManagerClient();
manager_client->GetTestInterface()->MoveServiceToIndex(
diff --git a/chromeos/network/network_state.cc b/chromeos/network/network_state.cc
index e648e70..57dfcd5 100644
--- a/chromeos/network/network_state.cc
+++ b/chromeos/network/network_state.cc
@@ -111,6 +111,8 @@ bool NetworkState::PropertyChanged(const std::string& key,
return GetStringValue(key, value, &guid_);
} else if (key == flimflam::kProfileProperty) {
return GetStringValue(key, value, &profile_path_);
+ } else if (key == flimflam::kProxyConfigProperty) {
+ return GetStringValue(key, value, &proxy_config_);
} else if (key == shill::kActivateOverNonCellularNetworkProperty) {
return GetBooleanValue(key, value, &activate_over_non_cellular_networks_);
} else if (key == shill::kOutOfCreditsProperty) {
@@ -177,6 +179,8 @@ void NetworkState::GetProperties(base::DictionaryValue* dictionary) const {
dictionary->SetStringWithoutPathExpansion(flimflam::kGuidProperty, guid_);
dictionary->SetStringWithoutPathExpansion(flimflam::kProfileProperty,
profile_path_);
+ dictionary->SetStringWithoutPathExpansion(flimflam::kProxyConfigProperty,
+ proxy_config_);
dictionary->SetBooleanWithoutPathExpansion(
shill::kActivateOverNonCellularNetworkProperty,
activate_over_non_cellular_networks_);
diff --git a/chromeos/network/network_state.h b/chromeos/network/network_state.h
index 87ee159..c78d5e8 100644
--- a/chromeos/network/network_state.h
+++ b/chromeos/network/network_state.h
@@ -45,6 +45,7 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
const std::string& guid() const { return guid_; }
const std::string& connection_state() const { return connection_state_; }
const std::string& profile_path() const { return profile_path_; }
+ const std::string& proxy_config() const { return proxy_config_; }
const std::string& error() const { return error_; }
const std::string& error_details() const { return error_details_; }
bool auto_connect() const { return auto_connect_; }
@@ -99,6 +100,7 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
std::string guid_;
std::string connection_state_;
std::string profile_path_;
+ std::string proxy_config_;
std::string error_;
std::string error_details_;
bool auto_connect_;