Commit 882011c4 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Migrate MessageLoop::current() to MessageLoopCurrent in /chrome/browser/chromeos/arc

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

Bug: 825327
Change-Id: I40de071dcef2e6356ce03a851a36e85722b4f00a
Reviewed-on: https://chromium-review.googlesource.com/1024317
Commit-Queue: Luis Hector Chavez <lhchavez@chromium.org>
Reviewed-by: default avatarLuis Hector Chavez <lhchavez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553154}
parent 7488e3f1
...@@ -27,7 +27,7 @@ class IconDecodeRequest : public ImageDecoder::ImageRequest { ...@@ -27,7 +27,7 @@ class IconDecodeRequest : public ImageDecoder::ImageRequest {
// Disables async safe decoding requests when unit tests are executed. // Disables async safe decoding requests when unit tests are executed.
// Icons are decoded at a separate process created by ImageDecoder. In unit // Icons are decoded at a separate process created by ImageDecoder. In unit
// tests these tasks may not finish before the test exits, which causes a // tests these tasks may not finish before the test exits, which causes a
// failure in the base::MessageLoop::current()->IsIdleForTesting() check // failure in the base::MessageLoopCurrent::Get()->IsIdleForTesting() check
// in test_browser_thread_bundle.cc. // in test_browser_thread_bundle.cc.
static void DisableSafeDecodingForTesting(); static void DisableSafeDecodingForTesting();
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include <memory> #include <memory>
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop_current.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "chrome/browser/chromeos/arc/user_session/arc_user_session_service.h" #include "chrome/browser/chromeos/arc/user_session/arc_user_session_service.h"
#include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/in_process_browser_test.h"
...@@ -35,7 +35,7 @@ int CountBroadcasts( ...@@ -35,7 +35,7 @@ int CountBroadcasts(
} }
void RunUntilIdle() { void RunUntilIdle() {
DCHECK(base::MessageLoop::current()); DCHECK(base::MessageLoopCurrent::Get());
base::RunLoop().RunUntilIdle(); base::RunLoop().RunUntilIdle();
} }
......
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