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

Unified Diff: components/google/core/browser/google_url_tracker.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/google/core/browser/google_url_tracker.cc
diff --git a/components/google/core/browser/google_url_tracker.cc b/components/google/core/browser/google_url_tracker.cc
index 25c51da7dfe47e49e3e12d52c4d98ffe3f260ff0..dabfc4041bd8324628230041a2a3e183e24a6835 100644
--- a/components/google/core/browser/google_url_tracker.cc
+++ b/components/google/core/browser/google_url_tracker.cc
@@ -6,8 +6,11 @@
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/location.h"
#include "base/prefs/pref_service.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_util.h"
+#include "base/thread_task_runner_handle.h"
#include "components/google/core/browser/google_pref_names.h"
#include "components/google/core/browser/google_switches.h"
#include "components/google/core/browser/google_util.h"
@@ -46,9 +49,9 @@ GoogleURLTracker::GoogleURLTracker(scoped_ptr<GoogleURLTrackerClient> client,
// "wakes up", we do nothing at all.
if (mode == NORMAL_MODE) {
static const int kStartFetchDelayMS = 5000;
- base::MessageLoop::current()->PostDelayedTask(FROM_HERE,
- base::Bind(&GoogleURLTracker::FinishSleep,
- weak_ptr_factory_.GetWeakPtr()),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&GoogleURLTracker::FinishSleep,
+ weak_ptr_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(kStartFetchDelayMS));
}
}

Powered by Google App Engine
This is Rietveld 408576698