| Index: chromeos/dbus/shill_service_client_stub.cc
|
| diff --git a/chromeos/dbus/shill_service_client_stub.cc b/chromeos/dbus/shill_service_client_stub.cc
|
| index 088369307f5071414aff6d3d19b246140b942162..1c1fd91ad8fce3fd4d928fbde73ef5328aa78d88 100644
|
| --- a/chromeos/dbus/shill_service_client_stub.cc
|
| +++ b/chromeos/dbus/shill_service_client_stub.cc
|
| @@ -76,7 +76,7 @@ void ShillServiceClientStub::SetProperty(const dbus::ObjectPath& service_path,
|
| base::DictionaryValue* dict = NULL;
|
| if (!stub_services_.GetDictionaryWithoutPathExpansion(
|
| service_path.value(), &dict)) {
|
| - error_callback.Run("StubError", "Service not found");
|
| + error_callback.Run("Error.InvalidService", "Invalid Service");
|
| return;
|
| }
|
| if (name == flimflam::kStateProperty) {
|
| @@ -109,7 +109,7 @@ void ShillServiceClientStub::ClearProperty(
|
| base::DictionaryValue* dict = NULL;
|
| if (!stub_services_.GetDictionaryWithoutPathExpansion(
|
| service_path.value(), &dict)) {
|
| - error_callback.Run("StubError", "Service not found");
|
| + error_callback.Run("Error.InvalidService", "Invalid Service");
|
| return;
|
| }
|
| dict->Remove(name, NULL);
|
| @@ -130,7 +130,7 @@ void ShillServiceClientStub::ClearProperties(
|
| base::DictionaryValue* dict = NULL;
|
| if (!stub_services_.GetDictionaryWithoutPathExpansion(
|
| service_path.value(), &dict)) {
|
| - error_callback.Run("StubError", "Service not found");
|
| + error_callback.Run("Error.InvalidService", "Invalid Service");
|
| return;
|
| }
|
| scoped_ptr<base::ListValue> results(new base::ListValue);
|
| @@ -187,6 +187,11 @@ void ShillServiceClientStub::Connect(const dbus::ObjectPath& service_path,
|
| void ShillServiceClientStub::Disconnect(const dbus::ObjectPath& service_path,
|
| const base::Closure& callback,
|
| const ErrorCallback& error_callback) {
|
| + base::Value* service;
|
| + if (!stub_services_.Get(service_path.value(), &service)) {
|
| + error_callback.Run("Error.InvalidService", "Invalid Service");
|
| + return;
|
| + }
|
| // Set Idle after a delay
|
| const int kConnectDelaySeconds = 2;
|
| base::StringValue idle_value(flimflam::kStateIdle);
|
| @@ -286,14 +291,16 @@ void ShillServiceClientStub::SetDefaultProperties() {
|
| AddService("stub_wifi1", "wifi1",
|
| flimflam::kTypeWifi,
|
| flimflam::kStateOnline);
|
| + SetServiceProperty("stub_wifi1",
|
| + flimflam::kSecurityProperty,
|
| + base::StringValue(flimflam::kSecurityWep));
|
|
|
| AddService("stub_wifi2", "wifi2_PSK",
|
| flimflam::kTypeWifi,
|
| flimflam::kStateIdle);
|
| - base::StringValue psk_value(flimflam::kSecurityPsk);
|
| SetServiceProperty("stub_wifi2",
|
| flimflam::kSecurityProperty,
|
| - psk_value);
|
| + base::StringValue(flimflam::kSecurityPsk));
|
| base::FundamentalValue strength_value(80);
|
| SetServiceProperty("stub_wifi2",
|
| flimflam::kSignalStrengthProperty,
|
| @@ -306,6 +313,12 @@ void ShillServiceClientStub::SetDefaultProperties() {
|
| SetServiceProperty("stub_cellular1",
|
| flimflam::kNetworkTechnologyProperty,
|
| technology_value);
|
| + SetServiceProperty("stub_cellular1",
|
| + flimflam::kActivationStateProperty,
|
| + base::StringValue(flimflam::kActivationStateNotActivated));
|
| + SetServiceProperty("stub_cellular1",
|
| + flimflam::kRoamingStateProperty,
|
| + base::StringValue(flimflam::kRoamingStateHome));
|
| }
|
|
|
| void ShillServiceClientStub::PassStubServiceProperties(
|
|
|