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

Unified Diff: chrome/browser/extensions/external_install_error.cc

Issue 2033753002: Remove use of deprecated MessageLoop methods in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: manual change Created 4 years, 7 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/extensions/external_install_error.cc
diff --git a/chrome/browser/extensions/external_install_error.cc b/chrome/browser/extensions/external_install_error.cc
index 23bea74ca3d29ef9fddb4412d2d25810b5716619..aa17a9488da1854e01f8ce98a20575afd5069cb2 100644
--- a/chrome/browser/extensions/external_install_error.cc
+++ b/chrome/browser/extensions/external_install_error.cc
@@ -8,10 +8,12 @@
#include <utility>
#include "base/bind.h"
+#include "base/location.h"
#include "base/macros.h"
-#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram_macros.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/extensions/extension_install_error_menu_item_id_provider.h"
#include "chrome/browser/extensions/extension_install_prompt_show_params.h"
@@ -321,10 +323,9 @@ void ExternalInstallError::OnInstallPromptDone(
// If the error isn't removed and deleted as part of handling the user's
// response (which can happen, e.g., if an uninstall fails), be sure to remove
// the error directly in order to ensure it's not called twice.
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&ExternalInstallError::RemoveError,
- weak_factory_.GetWeakPtr()));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&ExternalInstallError::RemoveError,
+ weak_factory_.GetWeakPtr()));
switch (result) {
case ExtensionInstallPrompt::Result::ACCEPTED:

Powered by Google App Engine
This is Rietveld 408576698