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

Unified Diff: chrome/browser/ui/cocoa/status_bubble_mac.mm

Issue 2132593002: Remove remaining calls to deprecated MessageLoop methods on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: h264_vt_encoder_unittest.cc Created 4 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
Index: chrome/browser/ui/cocoa/status_bubble_mac.mm
diff --git a/chrome/browser/ui/cocoa/status_bubble_mac.mm b/chrome/browser/ui/cocoa/status_bubble_mac.mm
index 613852f80617c9a9d1ff928389388ea87817f542..00cd3260804b77cec32bf52a88f734b369163c69 100644
--- a/chrome/browser/ui/cocoa/status_bubble_mac.mm
+++ b/chrome/browser/ui/cocoa/status_bubble_mac.mm
@@ -11,10 +11,10 @@
#include "base/debug/stack_trace.h"
#include "base/mac/scoped_block.h"
#include "base/mac/sdk_forward_declarations.h"
-#include "base/message_loop/message_loop.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/threading/thread_task_runner_handle.h"
#import "chrome/browser/ui/cocoa/bubble_view.h"
#include "components/url_formatter/elide_url.h"
#include "components/url_formatter/url_formatter.h"
@@ -253,9 +253,9 @@ void StatusBubbleMac::SetURL(const GURL& url) {
if (is_expanded_ && !url.is_empty()) {
ExpandBubble();
} else if (original_url_text.length() > status.length()) {
- base::MessageLoop::current()->PostDelayedTask(FROM_HERE,
- base::Bind(&StatusBubbleMac::ExpandBubble,
- expand_timer_factory_.GetWeakPtr()),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&StatusBubbleMac::ExpandBubble,
+ expand_timer_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(kExpandHoverDelayMS));
}
}
@@ -607,7 +607,8 @@ void StatusBubbleMac::StartTimer(int64_t delay_ms) {
// There can only be one running timer.
CancelTimer();
- base::MessageLoop::current()->PostDelayedTask(FROM_HERE,
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE,
base::Bind(&StatusBubbleMac::TimerFired, timer_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(delay_ms));
}

Powered by Google App Engine
This is Rietveld 408576698