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

Side by Side Diff: remoting/test/cyclic_frame_generator.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "remoting/test/cyclic_frame_generator.h" 5 #include "remoting/test/cyclic_frame_generator.h"
6 6
7 #include "base/time/default_tick_clock.h" 7 #include "base/time/default_tick_clock.h"
8 #include "remoting/test/frame_generator_util.h" 8 #include "remoting/test/frame_generator_util.h"
9 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" 9 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
10 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" 10 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
(...skipping 15 matching lines...) Expand all
26 } 26 }
27 27
28 CyclicFrameGenerator::CyclicFrameGenerator( 28 CyclicFrameGenerator::CyclicFrameGenerator(
29 std::vector<std::unique_ptr<webrtc::DesktopFrame>> reference_frames) 29 std::vector<std::unique_ptr<webrtc::DesktopFrame>> reference_frames)
30 : reference_frames_(std::move(reference_frames)), 30 : reference_frames_(std::move(reference_frames)),
31 clock_(&default_tick_clock_), 31 clock_(&default_tick_clock_),
32 started_time_(clock_->NowTicks()) { 32 started_time_(clock_->NowTicks()) {
33 CHECK(!reference_frames_.empty()); 33 CHECK(!reference_frames_.empty());
34 screen_size_ = reference_frames_[0]->size(); 34 screen_size_ = reference_frames_[0]->size();
35 for (const auto& frame : reference_frames_) { 35 for (const auto& frame : reference_frames_) {
36 CHECK(screen_size_.equals(frame->size())) 36 // All reference frames should have the same size.
37 << "All reference frames should have the same size."; 37 CHECK(screen_size_.equals(frame->size()));
38 } 38 }
39 } 39 }
40 40
41 CyclicFrameGenerator::~CyclicFrameGenerator() {} 41 CyclicFrameGenerator::~CyclicFrameGenerator() {}
42 42
43 void CyclicFrameGenerator::SetTickClock(base::TickClock* tick_clock) { 43 void CyclicFrameGenerator::SetTickClock(base::TickClock* tick_clock) {
44 clock_ = tick_clock; 44 clock_ = tick_clock;
45 started_time_ = clock_->NowTicks(); 45 started_time_ = clock_->NowTicks();
46 } 46 }
47 47
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 return result; 106 return result;
107 } 107 }
108 108
109 protocol::InputEventTimestamps CyclicFrameGenerator::TakeLastEventTimestamps() { 109 protocol::InputEventTimestamps CyclicFrameGenerator::TakeLastEventTimestamps() {
110 base::TimeTicks now = clock_->NowTicks(); 110 base::TimeTicks now = clock_->NowTicks();
111 return protocol::InputEventTimestamps{now, now}; 111 return protocol::InputEventTimestamps{now, now};
112 } 112 }
113 113
114 } // namespace test 114 } // namespace test
115 } // namespace remoting 115 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698