Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: chromeos/dbus/fake_shill_service_client.cc

Issue 648623004: Fix reconnect in case of empty global network policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromeos/network/network_connection_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
« no previous file with comments | « no previous file | chromeos/network/network_connection_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698