Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: media/cast/test/cast_benchmarks.cc

Issue 2086353002: Remove calls to deprecated MessageLoop methods in media. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/sender/h264_vt_encoder_unittest.cc ('k') | media/cast/test/receiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/test/cast_benchmarks.cc
diff --git a/media/cast/test/cast_benchmarks.cc b/media/cast/test/cast_benchmarks.cc
index c24785d0d32661bc6b9216c393cbfaf930322661..4bebe4a02d460cb712a505efa26ed5aa3a52dca1 100644
--- a/media/cast/test/cast_benchmarks.cc
+++ b/media/cast/test/cast_benchmarks.cc
@@ -37,6 +37,7 @@
#include "base/memory/ptr_util.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
@@ -655,12 +656,12 @@ class CastBenchmark {
SearchVector ac = a.blend(c, static_cast<double>(x) / max);
SearchVector v = ab.blend(ac, x == y ? 1.0 : static_cast<double>(y) / x);
thread_num++;
- (*threads)[thread_num % threads->size()]->message_loop()->PostTask(
- FROM_HERE,
- base::Bind(&CastBenchmark::BinarySearch,
- base::Unretained(this),
- v,
- accuracy));
+ (*threads)[thread_num % threads->size()]
+ ->message_loop()
+ ->task_runner()
+ ->PostTask(FROM_HERE,
+ base::Bind(&CastBenchmark::BinarySearch,
+ base::Unretained(this), v, accuracy));
} else {
skip *= 2;
SpanningSearch(max, x, y, skip, a, b, c, accuracy, threads);
@@ -686,12 +687,9 @@ class CastBenchmark {
a.bitrate.grade = 1.0;
a.latency.grade = 1.0;
a.packet_drop.grade = 1.0;
- threads[0]->message_loop()->PostTask(
- FROM_HERE,
- base::Bind(base::IgnoreResult(&CastBenchmark::RunOnePoint),
- base::Unretained(this),
- a,
- 1.0));
+ threads[0]->message_loop()->task_runner()->PostTask(
+ FROM_HERE, base::Bind(base::IgnoreResult(&CastBenchmark::RunOnePoint),
+ base::Unretained(this), a, 1.0));
} else {
SearchVector a, b, c;
a.bitrate.base = b.bitrate.base = c.bitrate.base = 100.0;
« no previous file with comments | « media/cast/sender/h264_vt_encoder_unittest.cc ('k') | media/cast/test/receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698