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

Unified Diff: chrome/browser/notifications/notification_platform_bridge_linux.cc

Issue 2928513003: Add comment clarifying the usage of CreateSingleThreadTaskRunner (Closed)
Patch Set: update comment Created 3 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/notification_platform_bridge_linux.cc
diff --git a/chrome/browser/notifications/notification_platform_bridge_linux.cc b/chrome/browser/notifications/notification_platform_bridge_linux.cc
index a7d134437114871661c78e7cb416d22f3015c9cd..020082f5a9fe6ec6adf0af9b45e15eff6ab9c91a 100644
--- a/chrome/browser/notifications/notification_platform_bridge_linux.cc
+++ b/chrome/browser/notifications/notification_platform_bridge_linux.cc
@@ -238,6 +238,10 @@ class NotificationPlatformBridgeLinuxImpl
explicit NotificationPlatformBridgeLinuxImpl(scoped_refptr<dbus::Bus> bus)
: bus_(bus) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+ // While the tasks in NotificationPlatformBridgeLinux merely need
+ // to run in sequence, many APIs in ::dbus are required to be
+ // called from the same thread (https://crbug.com/130984), so
+ // |task_runner_| is created as the single-threaded flavor.
task_runner_ = base::CreateSingleThreadTaskRunnerWithTraits(
{base::MayBlock(), base::TaskPriority::USER_BLOCKING});
registrar_.Add(this, chrome::NOTIFICATION_APP_TERMINATING,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698