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

Unified Diff: chrome/browser/ui/views/message_center/web_notification_tray.cc

Issue 1160073004: chrome/browser/ui: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check for task runner instead of current message loop. 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
Index: chrome/browser/ui/views/message_center/web_notification_tray.cc
diff --git a/chrome/browser/ui/views/message_center/web_notification_tray.cc b/chrome/browser/ui/views/message_center/web_notification_tray.cc
index d8a56116e0734b15d3bda15f373335e2d3aba666..300680784dd89223e9f9ba28d8f75ddd9b36060b 100644
--- a/chrome/browser/ui/views/message_center/web_notification_tray.cc
+++ b/chrome/browser/ui/views/message_center/web_notification_tray.cc
@@ -5,9 +5,12 @@
#include "chrome/browser/ui/views/message_center/web_notification_tray.h"
#include "base/i18n/number_formatting.h"
+#include "base/location.h"
#include "base/prefs/pref_service.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/status_icons/status_icon.h"
#include "chrome/browser/status_icons/status_icon_menu_model.h"
@@ -255,7 +258,7 @@ void WebNotificationTray::OnMessageCenterTrayChanged() {
// See the comments in ash/system/web_notification/web_notification_tray.cc
// for why PostTask.
should_update_tray_content_ = true;
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&WebNotificationTray::UpdateStatusIcon, AsWeakPtr()));
}

Powered by Google App Engine
This is Rietveld 408576698