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

Unified Diff: chromeos/dbus/fake_shill_service_client.cc

Issue 175243004: Chrome OS: Use Manager.DefaultService for Default Network (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Set default path of '/' to empty Created 6 years, 10 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
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 c968d80ec67892806d2c9a00518968a479fc2d2c..88e1b7eb1baf31ccb2aa27f24bf352f485fd762e 100644
--- a/chromeos/dbus/fake_shill_service_client.cc
+++ b/chromeos/dbus/fake_shill_service_client.cc
@@ -398,17 +398,20 @@ bool FakeShillServiceClient::SetServiceProperty(const std::string& service_path,
dict->MergeDictionary(&new_properties);
- if (property == shill::kStateProperty) {
- // When State changes the sort order of Services may change.
- DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface()->
- SortManagerServices();
- }
-
+ // First Shill notifies Chrome of the property change.
base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&FakeShillServiceClient::NotifyObserversPropertyChanged,
weak_ptr_factory_.GetWeakPtr(),
dbus::ObjectPath(service_path), changed_property));
+
+ // Next, if the State changes, the sort order of Services may change and the
+ // DefaultService property may change.
+ if (property == shill::kStateProperty) {
+ DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface()->
+ SortManagerServices();
+ }
+
return true;
}

Powered by Google App Engine
This is Rietveld 408576698