Commit a94fe046 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Migrate MessageLoop::current() to MessageLoopCurrent in /net/cookies

These changes were scripted as part of the effort to restrict exposure of the
raw MessageLoop*.

Note that many static methods exposed on MessageLoopCurrent are also deprecated
so it is very well possible that this is migrating to an already deprecated
method.

The goal of this pass is to reduce usage of MessageLoop::current() (and
ultimately make it impossible to obtain the MessageLoop* statically).

As such I will not edit this CL unless the script did something logically wrong.
I defer to owners to fix highlighted usage of already deprecated APIs.

Possible script screw ups / things to look out for in this review:
 - Storing MessageLoopCurrent in a MessageLoop* variable or comparing it against
   one (I will go over that in a separate pass).

Includes should have been stripped if that was the last usage of message_loop.h
in that file.

Please CQ if LGTY

This CL was uploaded by git cl split.

R=morlovich@chromium.org

Bug: 825327
Change-Id: Ifaba7bb17406a913293c2ba918334d28da4cbc3c
Reviewed-on: https://chromium-review.googlesource.com/1024790Reviewed-by: default avatarMaks Orlovich <morlovich@chromium.org>
Commit-Queue: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552902}
parent 3225ffb5
......@@ -15,6 +15,7 @@
#include "base/bind.h"
#include "base/location.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_current.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/string_tokenizer.h"
#include "base/threading/thread.h"
......@@ -117,10 +118,10 @@ class CookieStoreTest : public testing::Test {
http_bar_com_("http://bar.com") {
// This test may be used outside of the net test suite, and thus may not
// have a message loop.
if (!base::MessageLoop::current())
if (!base::MessageLoopCurrent::Get())
message_loop_.reset(new base::MessageLoop);
weak_factory_.reset(new base::WeakPtrFactory<base::MessageLoop>(
base::MessageLoop::current()));
base::MessageLoopCurrent::Get()));
}
// Helper methods for the asynchronous Cookie Store API that call the
......
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