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

Unified Diff: remoting/base/rate_counter.h

Issue 2911893003: Deprecate NonThreadSafe in remoting in favor of SequenceChecker. (Closed)
Patch Set: Created 3 years, 7 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/base/oauth_token_getter_impl.cc ('k') | remoting/base/rate_counter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/rate_counter.h
diff --git a/remoting/base/rate_counter.h b/remoting/base/rate_counter.h
index a7e0f35b3b6ea679acd0d72dc51e7ff90dcbb128..2950d8287571c658b8559bc300e11c5348429140 100644
--- a/remoting/base/rate_counter.h
+++ b/remoting/base/rate_counter.h
@@ -11,7 +11,7 @@
#include <utility>
#include "base/macros.h"
-#include "base/threading/non_thread_safe.h"
+#include "base/sequence_checker.h"
#include "base/time/default_tick_clock.h"
#include "base/time/tick_clock.h"
#include "base/time/time.h"
@@ -21,7 +21,7 @@ namespace remoting {
// Measures average rate per second of a sequence of point rate samples
// over a specified time window. This can be used to measure bandwidth, frame
// rates, etc.
-class RateCounter : public base::NonThreadSafe {
+class RateCounter {
public:
// Constructs a rate counter over the specified |time_window|.
explicit RateCounter(base::TimeDelta time_window);
@@ -57,6 +57,8 @@ class RateCounter : public base::NonThreadSafe {
base::DefaultTickClock default_tick_clock_;
base::TickClock* tick_clock_ = &default_tick_clock_;
+ SEQUENCE_CHECKER(sequence_checker_);
+
DISALLOW_COPY_AND_ASSIGN(RateCounter);
};
« no previous file with comments | « remoting/base/oauth_token_getter_impl.cc ('k') | remoting/base/rate_counter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698