diff options
author | stevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-12 22:08:38 +0000 |
---|---|---|
committer | stevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-12 22:08:38 +0000 |
commit | fa0336fa8a8909d614c9e500d76a0ebaa4844614 (patch) | |
tree | d9d549ac71541a75740a9c4319758d723477baeb /chromeos/dbus/fake_shill_service_client.cc | |
parent | 1208940857f29eff012e834c971adcf0471ca9c1 (diff) | |
download | chromium_src-fa0336fa8a8909d614c9e500d76a0ebaa4844614.zip chromium_src-fa0336fa8a8909d614c9e500d76a0ebaa4844614.tar.gz chromium_src-fa0336fa8a8909d614c9e500d76a0ebaa4844614.tar.bz2 |
Merge FavoriteState into NetworkState
BUG=375955
For trivial renaming:
R=armansito@chromium.org, pneubeck@chromium.org
TBR=derat@chromium.org, xiyuan@chromium.org
Review URL: https://codereview.chromium.org/289383004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276822 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus/fake_shill_service_client.cc')
-rw-r--r-- | chromeos/dbus/fake_shill_service_client.cc | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/chromeos/dbus/fake_shill_service_client.cc b/chromeos/dbus/fake_shill_service_client.cc index 6df6ec2..647625c 100644 --- a/chromeos/dbus/fake_shill_service_client.cc +++ b/chromeos/dbus/fake_shill_service_client.cc @@ -39,7 +39,7 @@ void PassStubServiceProperties( void CallSortManagerServices() { DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface()-> - SortManagerServices(); + SortManagerServices(true); } int GetInteractiveDelay() { @@ -322,8 +322,6 @@ void FakeShillServiceClient::AddServiceWithIPConfig( const std::string& state, const std::string& ipconfig_path, bool add_to_visible_list) { - DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface()-> - AddManagerService(service_path, add_to_visible_list); std::string device_path = DBusThreadManager::Get()->GetShillDeviceClient()->GetTestInterface()-> GetDevicePathForType(type); @@ -366,6 +364,9 @@ void FakeShillServiceClient::AddServiceWithIPConfig( properties->SetWithoutPathExpansion( shill::kStateProperty, new base::StringValue(state)); + properties->SetWithoutPathExpansion( + shill::kVisibleProperty, + new base::FundamentalValue(add_to_visible_list)); if (!ipconfig_path.empty()) { properties->SetWithoutPathExpansion( shill::kIPConfigProperty, @@ -377,20 +378,20 @@ void FakeShillServiceClient::AddServiceWithIPConfig( new base::StringValue(shill::kSecurityNone)); } - CallSortManagerServices(); - if (!profile_path.empty()) { DBusThreadManager::Get()->GetShillProfileClient()->GetTestInterface()-> UpdateService(profile_path, service_path); } -} -void FakeShillServiceClient::RemoveService(const std::string& service_path) { DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface()-> - RemoveManagerService(service_path, true); + AddManagerService(service_path); +} +void FakeShillServiceClient::RemoveService(const std::string& service_path) { stub_services_.RemoveWithoutPathExpansion(service_path, NULL); connect_behavior_.erase(service_path); + DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface()-> + RemoveManagerService(service_path); } bool FakeShillServiceClient::SetServiceProperty(const std::string& service_path, @@ -448,9 +449,10 @@ bool FakeShillServiceClient::SetServiceProperty(const std::string& service_path, ServiceStateChanged(service_path, state); } - // If the State changes, the sort order of Services may change and the - // DefaultService property may change. - if (property == shill::kStateProperty) { + // If the State or Visibility changes, the sort order of service lists may + // change and the DefaultService property may change. + if (property == shill::kStateProperty || + property == shill::kVisibleProperty) { base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&CallSortManagerServices)); } |