Index: chromeos/dbus/fake_shill_service_client.cc |
diff --git a/chromeos/dbus/fake_shill_service_client.cc b/chromeos/dbus/fake_shill_service_client.cc |
index 9f4bbc385d8cf6be1637321df04a2d29db7ba8c9..b21ae61013ca35d88b2e74ad941fed1837afbec1 100644 |
--- a/chromeos/dbus/fake_shill_service_client.cc |
+++ b/chromeos/dbus/fake_shill_service_client.cc |
@@ -400,6 +400,9 @@ base::DictionaryValue* FakeShillServiceClient::SetServiceProperties( |
properties->SetWithoutPathExpansion( |
shill::kSecurityProperty, |
new base::StringValue(shill::kSecurityNone)); |
+ properties->SetWithoutPathExpansion( |
+ shill::kModeProperty, |
+ new base::StringValue(shill::kModeManaged)); |
} |
return properties; |
} |
@@ -441,11 +444,13 @@ bool FakeShillServiceClient::SetServiceProperty(const std::string& service_path, |
dict->MergeDictionary(&new_properties); |
// Add or update the profile entry. |
+ ShillProfileClient::TestInterface* profile_test = |
+ DBusThreadManager::Get()->GetShillProfileClient()->GetTestInterface(); |
if (property == shill::kProfileProperty) { |
std::string profile_path; |
if (value.GetAsString(&profile_path)) { |
- DBusThreadManager::Get()->GetShillProfileClient()->GetTestInterface()-> |
- AddService(profile_path, service_path); |
+ if (!profile_path.empty()) |
+ profile_test->AddService(profile_path, service_path); |
stevenjb
2014/10/20 16:15:35
If profile_path is set to empty, should we remove
pneubeck (no reviews)
2014/10/20 16:21:24
Not sure. Removing the profile path could also mea
|
} else { |
LOG(ERROR) << "Profile value is not a String!"; |
} |
@@ -453,8 +458,7 @@ bool FakeShillServiceClient::SetServiceProperty(const std::string& service_path, |
std::string profile_path; |
if (dict->GetStringWithoutPathExpansion( |
shill::kProfileProperty, &profile_path) && !profile_path.empty()) { |
- DBusThreadManager::Get()->GetShillProfileClient()->GetTestInterface()-> |
- UpdateService(profile_path, service_path); |
+ profile_test->UpdateService(profile_path, service_path); |
} |
} |