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

Unified Diff: components/autofill/content/renderer/autofill_agent.cc

Issue 1144153004: components: 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, 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: components/autofill/content/renderer/autofill_agent.cc
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc
index bf1f54a3a13beb0f25d6dcec881e19512ad53dcb..990aa54ed9d2098d9c4109d9e3337c5b3357d615 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -7,10 +7,12 @@
#include "base/auto_reset.h"
#include "base/bind.h"
#include "base/command_line.h"
-#include "base/message_loop/message_loop.h"
+#include "base/location.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "components/autofill/content/common/autofill_messages.h"
#include "components/autofill/content/renderer/form_autofill_util.h"
@@ -395,11 +397,9 @@ void AutofillAgent::textFieldDidChange(const WebFormControlElement& element) {
// properly at this point (http://bugs.webkit.org/show_bug.cgi?id=16976) and
// it is needed to trigger autofill.
weak_ptr_factory_.InvalidateWeakPtrs();
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&AutofillAgent::TextFieldDidChangeImpl,
- weak_ptr_factory_.GetWeakPtr(),
- element));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&AutofillAgent::TextFieldDidChangeImpl,
+ weak_ptr_factory_.GetWeakPtr(), element));
}
void AutofillAgent::TextFieldDidChangeImpl(

Powered by Google App Engine
This is Rietveld 408576698