diff options
Diffstat (limited to 'chromeos/dbus/shill_manager_client_stub.cc')
-rw-r--r-- | chromeos/dbus/shill_manager_client_stub.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/chromeos/dbus/shill_manager_client_stub.cc b/chromeos/dbus/shill_manager_client_stub.cc index 82eac3b..36f02939 100644 --- a/chromeos/dbus/shill_manager_client_stub.cc +++ b/chromeos/dbus/shill_manager_client_stub.cc @@ -213,7 +213,8 @@ void ShillManagerClientStub::ConfigureService( // Add a new service to the service client stub because none exists, yet. service_client->AddServiceWithIPConfig(service_path, guid, type, flimflam::kStateIdle, ipconfig_path, - true); // Add service to watch list. + true /* visible */, + true /* watch */); existing_properties = service_client->GetServiceProperties(service_path); } @@ -398,13 +399,17 @@ void ShillManagerClientStub::MoveServiceToIndex( } void ShillManagerClientStub::AddManagerService(const std::string& service_path, + bool add_to_visible_list, bool add_to_watch_list) { - if (GetListProperty(flimflam::kServicesProperty)->AppendIfNotPresent( + // Always add to ServiceCompleteListProperty. + GetListProperty(shill::kServiceCompleteListProperty)->AppendIfNotPresent( + base::Value::CreateStringValue(service_path)); + // If visible, add to Services and notify if new. + if (add_to_visible_list && + GetListProperty(flimflam::kServicesProperty)->AppendIfNotPresent( base::Value::CreateStringValue(service_path))) { CallNotifyObserversPropertyChanged(flimflam::kServicesProperty, 0); } - GetListProperty(shill::kServiceCompleteListProperty)->AppendIfNotPresent( - base::Value::CreateStringValue(service_path)); if (add_to_watch_list) AddServiceToWatchList(service_path); } @@ -478,14 +483,11 @@ void ShillManagerClientStub::PassStubProperties( const DictionaryValueCallback& callback) const { scoped_ptr<base::DictionaryValue> stub_properties( stub_properties_.DeepCopy()); - // Remove disabled services from the list + // Remove disabled services from the list. stub_properties->SetWithoutPathExpansion( flimflam::kServicesProperty, GetEnabledServiceList(flimflam::kServicesProperty)); stub_properties->SetWithoutPathExpansion( - shill::kServiceCompleteListProperty, - GetEnabledServiceList(shill::kServiceCompleteListProperty)); - stub_properties->SetWithoutPathExpansion( flimflam::kServiceWatchListProperty, GetEnabledServiceList(flimflam::kServiceWatchListProperty)); callback.Run(DBUS_METHOD_CALL_SUCCESS, *stub_properties); |