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

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

Issue 69603002: Incorporating logging into Cast (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clean up Created 7 years, 1 month 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
Index: media/cast/logging/logging_impl.h
diff --git a/media/cast/logging/logging_impl.h b/media/cast/logging/logging_impl.h
index 568bff5360ec749970687e410968021b0353c2bc..015047092bbff5c2eb98d4a364c5cb96db88e1f6 100644
--- a/media/cast/logging/logging_impl.h
+++ b/media/cast/logging/logging_impl.h
@@ -10,6 +10,8 @@
// 2. UMA stats.
// 3. Tracing of raw events.
+#include "base/memory/ref_counted.h"
+#include "base/task_runner.h"
#include "media/cast/logging/logging_defines.h"
#include "media/cast/logging/logging_raw.h"
#include "media/cast/logging/logging_stats.h"
@@ -17,9 +19,11 @@
namespace media {
namespace cast {
-class LoggingImpl {
+// Should only be called from the main thread.
+class LoggingImpl : public base::NonThreadSafe {
public:
LoggingImpl(base::TickClock* clock,
+ scoped_refptr<base::TaskRunner> main_thread_proxy,
bool enable_data_collection,
bool enable_uma_stats,
bool enable_tracing);
@@ -42,7 +46,7 @@ class LoggingImpl {
uint8 frame_id,
uint16 packet_id,
uint16 max_packet_id,
- int size);
+ size_t size);
void InsertGenericEvent(CastLoggingEvent event, int value);
// Get raw data.
@@ -57,6 +61,7 @@ class LoggingImpl {
void Reset();
private:
+ scoped_refptr<base::TaskRunner> main_thread_proxy_;
LoggingRaw raw_;
LoggingStats stats_;
bool enable_data_collection_;

Powered by Google App Engine
This is Rietveld 408576698