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

Unified Diff: media/cast/logging/logging_impl.h

Issue 184813009: Cast Streaming API end-to-end browser_test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix LoggingImplTest + REBASE Created 6 years, 9 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 | « media/cast/cast_receiver_impl.cc ('k') | media/cast/logging/logging_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/logging/logging_impl.h
diff --git a/media/cast/logging/logging_impl.h b/media/cast/logging/logging_impl.h
index e51b114a869aecbaa1fb86378b6e57b51e4850a8..d8fb292b00f39e4270875a98d32be1d3269c7577 100644
--- a/media/cast/logging/logging_impl.h
+++ b/media/cast/logging/logging_impl.h
@@ -10,7 +10,7 @@
// 2. Tracing of raw events.
#include "base/memory/ref_counted.h"
-#include "base/single_thread_task_runner.h"
+#include "base/threading/thread_checker.h"
#include "media/cast/cast_config.h"
#include "media/cast/logging/logging_defines.h"
#include "media/cast/logging/logging_raw.h"
@@ -19,14 +19,14 @@
namespace media {
namespace cast {
-// Should only be called from the main thread.
-class LoggingImpl : public base::NonThreadSafe {
+class LoggingImpl {
public:
- LoggingImpl(scoped_refptr<base::SingleThreadTaskRunner> main_thread_proxy,
- const CastLoggingConfig& config);
+ explicit LoggingImpl(const CastLoggingConfig& config);
~LoggingImpl();
+ // Note: All methods below should be called from the same thread.
+
void InsertFrameEvent(const base::TimeTicks& time_of_event,
CastLoggingEvent event, uint32 rtp_timestamp,
uint32 frame_id);
@@ -66,7 +66,7 @@ class LoggingImpl : public base::NonThreadSafe {
void ResetStats();
private:
- scoped_refptr<base::SingleThreadTaskRunner> main_thread_proxy_;
+ base::ThreadChecker thread_checker_;
const CastLoggingConfig config_;
LoggingRaw raw_;
LoggingStats stats_;
« no previous file with comments | « media/cast/cast_receiver_impl.cc ('k') | media/cast/logging/logging_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698