[go: nahoru, domu]

[TaskEnvironment] Mass-migrate away from ScopedTaskEnvironment (1/2)

(well half of them because git cl upload wouldn't let me do
 them all at once...)

This is step #1 of the mass migration. Some of these will be
backported to SingleThreadTaskEnvironment in a later phase.

scoped_task_environment.h will also only move in a follow-up CL.

TBR=dcheng@chromium.org

Bug: 992483
Change-Id: I44bc376deee9b6c95bafac8d54165174d86a5001
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1756247
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#688086}
diff --git a/chromeos/process_proxy/process_output_watcher_unittest.cc b/chromeos/process_proxy/process_output_watcher_unittest.cc
index e58c36f..c8a9aeb19 100644
--- a/chromeos/process_proxy/process_output_watcher_unittest.cc
+++ b/chromeos/process_proxy/process_output_watcher_unittest.cc
@@ -125,14 +125,14 @@
     failed_ = !expectations_.CheckExpectations(output, type);
     if (failed_ || expectations_.IsDone()) {
       ASSERT_FALSE(test_case_done_callback_.is_null());
-      scoped_task_environment_.GetMainThreadTaskRunner()->PostTask(
+      task_environment_.GetMainThreadTaskRunner()->PostTask(
           FROM_HERE, test_case_done_callback_);
       test_case_done_callback_.Reset();
     }
 
     ASSERT_FALSE(ack_callback.is_null());
-    scoped_task_environment_.GetMainThreadTaskRunner()->PostTask(FROM_HERE,
-                                                                 ack_callback);
+    task_environment_.GetMainThreadTaskRunner()->PostTask(FROM_HERE,
+                                                          ack_callback);
   }
 
  protected:
@@ -193,7 +193,7 @@
 
  private:
   base::Closure test_case_done_callback_;
-  base::test::ScopedTaskEnvironment scoped_task_environment_;
+  base::test::TaskEnvironment task_environment_;
   std::unique_ptr<base::Thread> output_watch_thread_;
   bool output_watch_thread_started_;
   bool failed_;