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

Unified Diff: chrome/browser/ui/toolbar/toolbar_actions_bar.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: Review comments. 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/ui/tabs/hover_tab_selector.cc ('k') | chrome/browser/ui/unload_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/toolbar/toolbar_actions_bar.cc
diff --git a/chrome/browser/ui/toolbar/toolbar_actions_bar.cc b/chrome/browser/ui/toolbar/toolbar_actions_bar.cc
index fef0d5dd37075987dcb1293e4cf5fd644c5dc7cd..849d2d2be335fca0ee495eca4184e82cbf6d25ca 100644
--- a/chrome/browser/ui/toolbar/toolbar_actions_bar.cc
+++ b/chrome/browser/ui/toolbar/toolbar_actions_bar.cc
@@ -5,7 +5,10 @@
#include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
#include "base/auto_reset.h"
+#include "base/location.h"
#include "base/profiler/scoped_tracker.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "chrome/browser/extensions/extension_action_manager.h"
#include "chrome/browser/extensions/extension_message_bubble_controller.h"
#include "chrome/browser/extensions/extension_util.h"
@@ -376,11 +379,10 @@ void ToolbarActionsBar::CreateActions() {
scoped_ptr<extensions::ExtensionMessageBubbleController> controller =
ExtensionMessageBubbleFactory(browser_->profile()).GetController();
if (controller) {
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&ToolbarActionsBar::MaybeShowExtensionBubble,
- weak_ptr_factory_.GetWeakPtr(),
- base::Passed(controller.Pass())));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&ToolbarActionsBar::MaybeShowExtensionBubble,
+ weak_ptr_factory_.GetWeakPtr(),
+ base::Passed(controller.Pass())));
}
}
}
@@ -474,7 +476,7 @@ void ToolbarActionsBar::PopOutAction(ToolbarActionViewController* controller,
ResizeDelegate(gfx::Tween::LINEAR, false);
if (!delegate_->IsAnimating()) {
// Don't call the closure re-entrantly.
- base::MessageLoop::current()->PostTask(FROM_HERE, closure);
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, closure);
} else {
popped_out_closure_ = closure;
}
« no previous file with comments | « chrome/browser/ui/tabs/hover_tab_selector.cc ('k') | chrome/browser/ui/unload_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698