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

Unified Diff: chrome/browser/chromeos/dbus/cros_dbus_service.cc

Issue 20555003: Allow Chromium's DBus service ownership to be stealable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed nits Created 7 years, 5 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/dbus/ibus/ibus_panel_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/dbus/cros_dbus_service.cc
diff --git a/chrome/browser/chromeos/dbus/cros_dbus_service.cc b/chrome/browser/chromeos/dbus/cros_dbus_service.cc
index 2843aa0b6a5c4208f5ddf1977b022822fcf5ffe0..aefccdb9b43a958b72cdd3adce9bd791e6a90c76 100644
--- a/chrome/browser/chromeos/dbus/cros_dbus_service.cc
+++ b/chrome/browser/chromeos/dbus/cros_dbus_service.cc
@@ -49,7 +49,16 @@ class CrosDBusServiceImpl : public CrosDBusService {
if (service_started_)
return;
+ // There are some situations, described in http://crbug.com/234382#c27,
+ // where processes on Linux can wind up stuck in an uninterruptible state
+ // for tens of seconds. If this happens when Chrome is trying to exit,
+ // this unkillable process can wind up clinging to ownership of
+ // kLibCrosServiceName while the system is trying to restart the browser.
+ // This leads to a fatal situation if we don't allow the new browser
+ // instance to replace the old as the owner of kLibCrosServiceName as seen
+ // in http://crbug.com/234382. Hence, REQUIRE_PRIMARY_ALLOW_REPLACEMENT.
bus_->RequestOwnership(kLibCrosServiceName,
+ dbus::Bus::REQUIRE_PRIMARY_ALLOW_REPLACEMENT,
base::Bind(&CrosDBusServiceImpl::OnOwnership,
base::Unretained(this)));
« no previous file with comments | « no previous file | chromeos/dbus/ibus/ibus_panel_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698