Commit 8d3f7a83 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Migrate MessageLoop::current() to MessageLoopCurrent in /third_party/blink/renderer/platform

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=mkwst@chromium.org

Bug: 825327
Change-Id: Ic19845b885a4527fbdf5acb2e41a4b75153a1998
Reviewed-on: https://chromium-review.googlesource.com/1024395Reviewed-by: default avatarMike West <mkwst@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553532}
parent 2d217373
...@@ -8,7 +8,7 @@ include_rules = [ ...@@ -8,7 +8,7 @@ include_rules = [
# Dependencies. # Dependencies.
"+base/callback.h", "+base/callback.h",
"+base/containers/span.h", "+base/containers/span.h",
"+base/message_loop/message_loop.h", "+base/message_loop/message_loop_current.h",
"+base/observer_list.h", "+base/observer_list.h",
"+base/strings/string16.h", "+base/strings/string16.h",
"+mojo/common/big_string.mojom-blink.h", "+mojo/common/big_string.mojom-blink.h",
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MOJO_MOJO_HELPER_H_ #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MOJO_MOJO_HELPER_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MOJO_MOJO_HELPER_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MOJO_MOJO_HELPER_H_
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop_current.h"
namespace blink { namespace blink {
...@@ -14,7 +14,7 @@ namespace blink { ...@@ -14,7 +14,7 @@ namespace blink {
// TODO(leonhsl): http://crbug.com/660274 Remove this API by ensuring // TODO(leonhsl): http://crbug.com/660274 Remove this API by ensuring
// a message loop before calling blink::initialize(). // a message loop before calling blink::initialize().
inline bool CanInitializeMojo() { inline bool CanInitializeMojo() {
return base::MessageLoop::current(); return base::MessageLoopCurrent::IsSet();
} }
} // namespace blink } // namespace blink
......
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