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

Side by Side Diff: media/capture/content/smooth_event_sampler.cc

Issue 1542013004: Switch to standard integer types in media/, take 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more stddef Created 4 years, 12 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
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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/capture/content/smooth_event_sampler.h" 5 #include "media/capture/content/smooth_event_sampler.h"
6 6
7 #include <stdint.h>
8
7 #include <algorithm> 9 #include <algorithm>
8 10
9 #include "base/trace_event/trace_event.h" 11 #include "base/trace_event/trace_event.h"
10 12
11 namespace media { 13 namespace media {
12 14
13 SmoothEventSampler::SmoothEventSampler(base::TimeDelta min_capture_period, 15 SmoothEventSampler::SmoothEventSampler(base::TimeDelta min_capture_period,
14 int redundant_capture_goal) 16 int redundant_capture_goal)
15 : redundant_capture_goal_(redundant_capture_goal), 17 : redundant_capture_goal_(redundant_capture_goal),
16 overdue_sample_count_(0), 18 overdue_sample_count_(0),
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 base::TimeDelta dirty_interval = event_time - last_sample_; 82 base::TimeDelta dirty_interval = event_time - last_sample_;
81 return dirty_interval >= 83 return dirty_interval >=
82 base::TimeDelta::FromMilliseconds(OVERDUE_DIRTY_THRESHOLD_MILLIS); 84 base::TimeDelta::FromMilliseconds(OVERDUE_DIRTY_THRESHOLD_MILLIS);
83 } 85 }
84 86
85 bool SmoothEventSampler::HasUnrecordedEvent() const { 87 bool SmoothEventSampler::HasUnrecordedEvent() const {
86 return !current_event_.is_null() && current_event_ != last_sample_; 88 return !current_event_.is_null() && current_event_ != last_sample_;
87 } 89 }
88 90
89 } // namespace media 91 } // namespace media
OLDNEW
« no previous file with comments | « media/capture/content/screen_capture_device_core.cc ('k') | media/capture/content/smooth_event_sampler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698