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

Unified Diff: chrome/browser/profiles/profile_destroyer.cc

Issue 1143343005: chrome/browser: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. 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/profiles/profile_destroyer.cc
diff --git a/chrome/browser/profiles/profile_destroyer.cc b/chrome/browser/profiles/profile_destroyer.cc
index 5ce9aaa4c3796ca8484347ef00281ce5a4f63b4b..532b3918d1311ea18c71b01dda0ae31b48fd19b0 100644
--- a/chrome/browser/profiles/profile_destroyer.cc
+++ b/chrome/browser/profiles/profile_destroyer.cc
@@ -5,8 +5,10 @@
#include "chrome/browser/profiles/profile_destroyer.h"
#include "base/bind.h"
+#include "base/location.h"
#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "base/trace_event/trace_event.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/render_process_host.h"
@@ -142,9 +144,9 @@ void ProfileDestroyer::RenderProcessHostDestroyed(
if (num_hosts_ == 0) {
// Delay the destruction one step further in case other observers need to
// look at the profile attached to the host.
- base::MessageLoop::current()->PostTask(
- FROM_HERE, base::Bind(
- &ProfileDestroyer::DestroyProfile, weak_ptr_factory_.GetWeakPtr()));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&ProfileDestroyer::DestroyProfile,
+ weak_ptr_factory_.GetWeakPtr()));
}
}

Powered by Google App Engine
This is Rietveld 408576698