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

Unified Diff: chrome/browser/ui/views/status_bubble_views.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/status_bubble_views.cc
diff --git a/chrome/browser/ui/views/status_bubble_views.cc b/chrome/browser/ui/views/status_bubble_views.cc
index a6ca0372db3d154b63f7f68737fd351a4dcb0f30..b9409945ebb46eca200983e5904924c0a8591ac4 100644
--- a/chrome/browser/ui/views/status_bubble_views.cc
+++ b/chrome/browser/ui/views/status_bubble_views.cc
@@ -8,9 +8,11 @@
#include "base/bind.h"
#include "base/i18n/rtl.h"
-#include "base/message_loop/message_loop.h"
+#include "base/location.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/ui/elide_url.h"
#include "net/base/net_util.h"
@@ -242,10 +244,9 @@ void StatusBubbleViews::StatusView::StartTimer(base::TimeDelta time) {
if (timer_factory_.HasWeakPtrs())
timer_factory_.InvalidateWeakPtrs();
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&StatusBubbleViews::StatusView::OnTimer,
- timer_factory_.GetWeakPtr()),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&StatusBubbleViews::StatusView::OnTimer,
msw 2015/06/10 00:12:57 nit: the old line breaking might have been clearer
Sami 2015/06/10 12:35:34 Right, this was done by git cl format. I've revert
+ timer_factory_.GetWeakPtr()),
time);
}
@@ -699,10 +700,9 @@ void StatusBubbleViews::SetURL(const GURL& url, const std::string& languages) {
if (is_expanded_ && !url.is_empty()) {
ExpandBubble();
} else if (net::FormatUrl(url, languages).length() > url_text_.length()) {
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&StatusBubbleViews::ExpandBubble,
- expand_timer_factory_.GetWeakPtr()),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&StatusBubbleViews::ExpandBubble,
+ expand_timer_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(kExpandHoverDelayMS));
}
}

Powered by Google App Engine
This is Rietveld 408576698