diff options
author | pneubeck <pneubeck@chromium.org> | 2014-10-20 10:09:20 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-20 17:09:51 +0000 |
commit | 6071e0f89dc2b8042e74ce26386c125d5b2e6f69 (patch) | |
tree | c491eac7d907ae76d4c9da486fba87862f027deb /chromeos/dbus/fake_shill_service_client.cc | |
parent | 76b13bfe17a7bf70ea6a2763e1f8c68aca794f66 (diff) | |
download | chromium_src-6071e0f89dc2b8042e74ce26386c125d5b2e6f69.zip chromium_src-6071e0f89dc2b8042e74ce26386c125d5b2e6f69.tar.gz chromium_src-6071e0f89dc2b8042e74ce26386c125d5b2e6f69.tar.bz2 |
Fix reconnect in case of empty global network policy.
While there, remove some error messages because of incomplete test setup or incorrect fake behavior.
BUG=425049
Review URL: https://codereview.chromium.org/648623004
Cr-Commit-Position: refs/heads/master@{#300284}
Diffstat (limited to 'chromeos/dbus/fake_shill_service_client.cc')
-rw-r--r-- | chromeos/dbus/fake_shill_service_client.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/chromeos/dbus/fake_shill_service_client.cc b/chromeos/dbus/fake_shill_service_client.cc index 9f4bbc3..b21ae61 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); } 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); } } |