Commit 5e8b57ed authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Migrate MessageLoop::current() to MessageLoopCurrent in /ui/ozone/platform/drm

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.

TBR=dnicoara@chromium.org

Bug: 825327
Change-Id: I2d0a66205586d87c27d7ba8b87a7d4f4416f1728
Reviewed-on: https://chromium-review.googlesource.com/1024446Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553671}
parent f2776921
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/free_deleter.h" #include "base/memory/free_deleter.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_current.h"
#include "base/message_loop/message_pump_for_io.h" #include "base/message_loop/message_pump_for_io.h"
#include "base/posix/safe_strerror.h" #include "base/posix/safe_strerror.h"
#include "base/task_runner.h" #include "base/task_runner.h"
...@@ -302,7 +303,7 @@ class DrmDevice::IOWatcher : public base::MessagePumpLibevent::FdWatcher { ...@@ -302,7 +303,7 @@ class DrmDevice::IOWatcher : public base::MessagePumpLibevent::FdWatcher {
private: private:
void Register() { void Register() {
DCHECK(base::MessageLoopForIO::IsCurrent()); DCHECK(base::MessageLoopForIO::IsCurrent());
base::MessageLoopForIO::current()->WatchFileDescriptor( base::MessageLoopCurrentForIO::Get()->WatchFileDescriptor(
fd_, true, base::MessagePumpForIO::WATCH_READ, &controller_, this); fd_, true, base::MessagePumpForIO::WATCH_READ, &controller_, this);
} }
......
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