Skip to content

Commit

Permalink
Migrate MessageLoop::current() to MessageLoopCurrent in /content/brow…
Browse files Browse the repository at this point in the history
…ser/media/capture/desktop_capture_device_unittest.cc

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

Bug: 825327
Change-Id: Ife4c6b69dcaa445e9e8df3eb48df560c160f9931
Reviewed-on: https://chromium-review.googlesource.com/1024248
Commit-Queue: Gabriel Charette <gab@chromium.org>
Commit-Queue: Zijie He <zijiehe@chromium.org>
Reviewed-by: Zijie He <zijiehe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552767}
  • Loading branch information
Gabriel Charette authored and Commit Bot committed Apr 23, 2018
1 parent 78d1b47 commit 0e38ff0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "base/command_line.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_current.h"
#include "base/strings/string_number_conversions.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/test_mock_time_task_runner.h"
Expand Down Expand Up @@ -626,7 +626,7 @@ class DesktopCaptureDeviceThrottledTest : public DesktopCaptureDeviceTest {
// 'PostNonNestable' is required to make sure the next one
// shot capture timer is already pushed when forwaring the
// virtual time by the next pending task delay.
base::MessageLoop::current()
base::MessageLoopCurrent::Get()
->task_runner()
->PostNonNestableTask(
FROM_HERE,
Expand Down

0 comments on commit 0e38ff0

Please sign in to comment.