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

Unified Diff: remoting/protocol/performance_tracker.h

Issue 2113523007: More cleanups in FrameStats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android Created 4 years, 5 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 | « remoting/protocol/frame_stats.cc ('k') | remoting/protocol/performance_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/performance_tracker.h
diff --git a/remoting/protocol/performance_tracker.h b/remoting/protocol/performance_tracker.h
index d89221b269ce52a5cd5cbba9a5e9ef9e2e161f05..fb7a0e0cce67bbf0820280021a1b40acccc9d5a3 100644
--- a/remoting/protocol/performance_tracker.h
+++ b/remoting/protocol/performance_tracker.h
@@ -12,15 +12,14 @@
#include "base/timer/timer.h"
#include "remoting/base/rate_counter.h"
#include "remoting/base/running_samples.h"
+#include "remoting/protocol/frame_stats.h"
namespace remoting {
namespace protocol {
-struct FrameStats;
-
// PerformanceTracker defines a bundle of performance counters and statistics
// for chromoting.
-class PerformanceTracker {
+class PerformanceTracker : public FrameStatsConsumer {
public:
// Callback that updates UMA custom counts or custom times histograms.
typedef base::Callback<void(const std::string& histogram_name,
@@ -36,7 +35,7 @@ class PerformanceTracker {
UpdateUmaEnumHistogramCallback;
PerformanceTracker();
- virtual ~PerformanceTracker();
+ ~PerformanceTracker() override;
// Constant used to calculate the average for rate metrics and used by the
// plugin for the frequency at which stats should be updated.
@@ -52,8 +51,8 @@ class PerformanceTracker {
const RunningSamples& video_paint_ms() { return video_paint_ms_; }
const RunningSamples& round_trip_ms() { return round_trip_ms_; }
- // Record stats for a video-packet.
- void RecordVideoFrameStats(const FrameStats& stats);
+ // FrameStatsConsumer interface.
+ void OnVideoFrameStats(const FrameStats& stats) override;
// Sets callbacks in ChromotingInstance to update a UMA custom counts, custom
// times or enum histogram.
« no previous file with comments | « remoting/protocol/frame_stats.cc ('k') | remoting/protocol/performance_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698