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

Unified Diff: chrome/renderer/safe_browsing/phishing_classifier.cc

Issue 1167163002: chrome: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added some missing message_loop.h includes. 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/renderer/safe_browsing/phishing_classifier.cc
diff --git a/chrome/renderer/safe_browsing/phishing_classifier.cc b/chrome/renderer/safe_browsing/phishing_classifier.cc
index d731a76e1a3f705aa7722fac57188b88856f8a60..e1d1926b20ef45273a422c1782724ecca00e816e 100644
--- a/chrome/renderer/safe_browsing/phishing_classifier.cc
+++ b/chrome/renderer/safe_browsing/phishing_classifier.cc
@@ -9,10 +9,12 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/compiler_specific.h"
+#include "base/location.h"
#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_util.h"
+#include "base/thread_task_runner_handle.h"
#include "chrome/common/safe_browsing/csd.pb.h"
#include "chrome/common/url_constants.h"
#include "chrome/renderer/safe_browsing/feature_extractor_clock.h"
@@ -98,10 +100,9 @@ void PhishingClassifier::BeginClassification(
// asynchronously, rather than directly from this method. To ensure that
// this is the case, post a task to begin feature extraction on the next
// iteration of the message loop.
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&PhishingClassifier::BeginFeatureExtraction,
- weak_factory_.GetWeakPtr()));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&PhishingClassifier::BeginFeatureExtraction,
+ weak_factory_.GetWeakPtr()));
}
void PhishingClassifier::BeginFeatureExtraction() {

Powered by Google App Engine
This is Rietveld 408576698