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

Unified Diff: chrome/browser/net/predictor.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
« no previous file with comments | « chrome/browser/net/chrome_url_request_context_getter.cc ('k') | chrome/browser/net/predictor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/predictor.cc
diff --git a/chrome/browser/net/predictor.cc b/chrome/browser/net/predictor.cc
index 06f167ba631ba6e655394fbd9d5006487eec46b9..9299b63358dec01e1bdd97292cf68ec474d075b8 100644
--- a/chrome/browser/net/predictor.cc
+++ b/chrome/browser/net/predictor.cc
@@ -13,16 +13,19 @@
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/containers/mru_cache.h"
+#include "base/location.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "base/prefs/pref_service.h"
#include "base/prefs/scoped_user_pref_update.h"
#include "base/profiler/scoped_tracker.h"
+#include "base/single_thread_task_runner.h"
#include "base/stl_util.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/synchronization/waitable_event.h"
+#include "base/thread_task_runner_handle.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
#include "base/values.h"
@@ -1142,10 +1145,9 @@ void Predictor::PostIncrementalTrimTask() {
return;
const TimeDelta kDurationBetweenTrimmingIncrements =
TimeDelta::FromSeconds(kDurationBetweenTrimmingIncrementsSeconds);
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&Predictor::IncrementalTrimReferrers,
- weak_factory_->GetWeakPtr(), false),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&Predictor::IncrementalTrimReferrers,
+ weak_factory_->GetWeakPtr(), false),
kDurationBetweenTrimmingIncrements);
}
« no previous file with comments | « chrome/browser/net/chrome_url_request_context_getter.cc ('k') | chrome/browser/net/predictor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698