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

Side by Side Diff: media/cast/test/utility/standalone_cast_environment.cc

Issue 2901113003: Fix breakages while performance_browser_tests was not running on Mac. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « chrome/test/perf/mach_ports_performancetest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/cast/test/utility/standalone_cast_environment.h" 5 #include "media/cast/test/utility/standalone_cast_environment.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/threading/thread_restrictions.h"
9 #include "base/time/default_tick_clock.h" 10 #include "base/time/default_tick_clock.h"
10 11
11 namespace media { 12 namespace media {
12 namespace cast { 13 namespace cast {
13 14
14 StandaloneCastEnvironment::StandaloneCastEnvironment() 15 StandaloneCastEnvironment::StandaloneCastEnvironment()
15 : CastEnvironment( 16 : CastEnvironment(
16 base::WrapUnique<base::TickClock>(new base::DefaultTickClock()), 17 base::WrapUnique<base::TickClock>(new base::DefaultTickClock()),
17 NULL, 18 NULL,
18 NULL, 19 NULL,
(...skipping 14 matching lines...) Expand all
33 34
34 StandaloneCastEnvironment::~StandaloneCastEnvironment() { 35 StandaloneCastEnvironment::~StandaloneCastEnvironment() {
35 CHECK(CalledOnValidThread()); 36 CHECK(CalledOnValidThread());
36 CHECK(!main_thread_.IsRunning()); 37 CHECK(!main_thread_.IsRunning());
37 CHECK(!audio_thread_.IsRunning()); 38 CHECK(!audio_thread_.IsRunning());
38 CHECK(!video_thread_.IsRunning()); 39 CHECK(!video_thread_.IsRunning());
39 } 40 }
40 41
41 void StandaloneCastEnvironment::Shutdown() { 42 void StandaloneCastEnvironment::Shutdown() {
42 CHECK(CalledOnValidThread()); 43 CHECK(CalledOnValidThread());
44
45 base::ThreadRestrictions::ScopedAllowIO
46 because_i_brought_you_into_this_world_and_i_am_gonna_take_you_out;
43 main_thread_.Stop(); 47 main_thread_.Stop();
44 audio_thread_.Stop(); 48 audio_thread_.Stop();
45 video_thread_.Stop(); 49 video_thread_.Stop();
46 } 50 }
47 51
48 } // namespace cast 52 } // namespace cast
49 } // namespace media 53 } // namespace media
OLDNEW
« no previous file with comments | « chrome/test/perf/mach_ports_performancetest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698