Commit 53803cd4 authored by fdoray's avatar fdoray Committed by Commit bot

Remove use of deprecated MessageLoop method in ios.

This CL replaces MessageLoop::current()->DeleteSoon with
ThreadTaskRunnerHandle::Get()->DeleteSoon in ios. These
calls are equivalent on threads that run a MessageLoop.

BUG=616447
R=droger@chromium.org

Review-Url: https://codereview.chromium.org/2035953002
Cr-Commit-Position: refs/heads/master@{#398282}
parent 1514931b
......@@ -6,7 +6,9 @@
#include <stddef.h>
#include "base/message_loop/message_loop.h"
#include "base/location.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "components/prefs/pref_service.h"
#include "components/search_engines/search_engines_pref_names.h"
#include "components/search_engines/template_url_prepopulate_data.h"
......@@ -75,7 +77,7 @@ class LoadedObserver : public TemplateURLServiceObserver {
service_->RemoveObserver(this);
UpdateSearchEngine(service_);
// Only delete this class when this callback is finished.
base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
}
private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment