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

Unified Diff: chrome/browser/ui/extensions/extension_installed_bubble.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
Index: chrome/browser/ui/extensions/extension_installed_bubble.cc
diff --git a/chrome/browser/ui/extensions/extension_installed_bubble.cc b/chrome/browser/ui/extensions/extension_installed_bubble.cc
index 9e260ea2c2790fcbe4f004c40cf2c882c056fe2f..2d5d7bd15a51444d5b7913987999a1a69e1da090 100644
--- a/chrome/browser/ui/extensions/extension_installed_bubble.cc
+++ b/chrome/browser/ui/extensions/extension_installed_bubble.cc
@@ -7,8 +7,10 @@
#include <string>
#include "base/bind.h"
-#include "base/message_loop/message_loop.h"
+#include "base/location.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/extensions/api/commands/command_service.h"
@@ -131,10 +133,9 @@ void ExtensionInstalledBubble::ShowInternal() {
if (delegate_->MaybeShowNow())
return;
if (animation_wait_retries_++ < kAnimationWaitRetries) {
- base::MessageLoopForUI::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&ExtensionInstalledBubble::ShowInternal,
- weak_factory_.GetWeakPtr()),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&ExtensionInstalledBubble::ShowInternal,
+ weak_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(kAnimationWaitMs));
}
}
@@ -148,10 +149,9 @@ void ExtensionInstalledBubble::OnExtensionLoaded(
animation_wait_retries_ = 0;
// PostTask to ourself to allow all EXTENSION_LOADED Observers to run.
- base::MessageLoopForUI::current()->PostTask(
- FROM_HERE,
- base::Bind(&ExtensionInstalledBubble::ShowInternal,
- weak_factory_.GetWeakPtr()));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&ExtensionInstalledBubble::ShowInternal,
+ weak_factory_.GetWeakPtr()));
}
}
« no previous file with comments | « chrome/browser/ui/exclusive_access/fullscreen_controller.cc ('k') | chrome/browser/ui/fast_unload_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698