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

Side by Side Diff: media/cast/test/fake_single_thread_task_runner.cc

Issue 161593002: Cast: an app to generate log data and do (de)serailization and (de)compression. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@encoding-event-subscriber
Patch Set: Rewrote the encode/decode logic without using internal protobuf APIs, so don't need to add protobuf… Created 6 years, 10 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 | « media/cast/cast.gyp ('k') | media/cast/test/log_encoder.cc » ('j') | 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/fake_single_thread_task_runner.h" 5 #include "media/cast/test/fake_single_thread_task_runner.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/time/tick_clock.h" 8 #include "base/time/tick_clock.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10 9
11 namespace media { 10 namespace media {
12 namespace cast { 11 namespace cast {
13 namespace test { 12 namespace test {
14 13
15 FakeSingleThreadTaskRunner::FakeSingleThreadTaskRunner( 14 FakeSingleThreadTaskRunner::FakeSingleThreadTaskRunner(
16 base::SimpleTestTickClock* clock) 15 base::SimpleTestTickClock* clock)
17 : clock_(clock) {} 16 : clock_(clock) {}
18 17
19 FakeSingleThreadTaskRunner::~FakeSingleThreadTaskRunner() {} 18 FakeSingleThreadTaskRunner::~FakeSingleThreadTaskRunner() {}
20 19
21 bool FakeSingleThreadTaskRunner::PostDelayedTask( 20 bool FakeSingleThreadTaskRunner::PostDelayedTask(
22 const tracked_objects::Location& from_here, 21 const tracked_objects::Location& from_here,
23 const base::Closure& task, 22 const base::Closure& task,
24 base::TimeDelta delay) { 23 base::TimeDelta delay) {
25 EXPECT_GE(delay, base::TimeDelta()); 24 DCHECK_GE(delay.ToInternalValue(), 0);
26 PostedTask posed_task(from_here, 25 PostedTask posed_task(from_here,
27 task, 26 task,
28 clock_->NowTicks(), 27 clock_->NowTicks(),
29 delay, 28 delay,
30 base::TestPendingTask::NESTABLE); 29 base::TestPendingTask::NESTABLE);
31 30
32 tasks_.insert(std::make_pair(posed_task.GetTimeToRun(), posed_task)); 31 tasks_.insert(std::make_pair(posed_task.GetTimeToRun(), posed_task));
33 return false; 32 return false;
34 } 33 }
35 34
(...skipping 21 matching lines...) Expand all
57 const tracked_objects::Location& from_here, 56 const tracked_objects::Location& from_here,
58 const base::Closure& task, 57 const base::Closure& task,
59 base::TimeDelta delay) { 58 base::TimeDelta delay) {
60 NOTIMPLEMENTED(); 59 NOTIMPLEMENTED();
61 return false; 60 return false;
62 } 61 }
63 62
64 } // namespace test 63 } // namespace test
65 } // namespace cast 64 } // namespace cast
66 } // namespace media 65 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/cast.gyp ('k') | media/cast/test/log_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698