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

Unified Diff: chrome/browser/status_icons/desktop_notification_balloon.cc

Issue 1143343005: chrome/browser: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 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 | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | chrome/browser/sync/backend_migrator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/status_icons/desktop_notification_balloon.cc
diff --git a/chrome/browser/status_icons/desktop_notification_balloon.cc b/chrome/browser/status_icons/desktop_notification_balloon.cc
index 31a893a2fa5da0ef35c2ab07dd59ce4dd5b9e6f7..2bdf5e167167371cc4312080fa0e73b39eab85d8 100644
--- a/chrome/browser/status_icons/desktop_notification_balloon.cc
+++ b/chrome/browser/status_icons/desktop_notification_balloon.cc
@@ -5,7 +5,10 @@
#include "chrome/browser/status_icons/desktop_notification_balloon.h"
#include "base/bind.h"
+#include "base/location.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/notifications/desktop_notification_service.h"
@@ -39,10 +42,9 @@ class DummyNotificationDelegate : public NotificationDelegate {
: id_(kNotificationPrefix + id), profile_(profile) {}
void Display() override {
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(
- &CloseBalloon, id(), NotificationUIManager::GetProfileID(profile_)),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&CloseBalloon, id(),
+ NotificationUIManager::GetProfileID(profile_)),
base::TimeDelta::FromSeconds(kTimeoutSeconds));
}
std::string id() const override { return id_; }
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | chrome/browser/sync/backend_migrator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698