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

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: Adding scoped_ptr include 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
« no previous file with comments | « media/cast/logging/logging_defines.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 5e724e0bb0bf66c3510f1c95bdafb3b1a072f192..628f346fc5a169cb5467db0dc11cb5ec3e58e8f9 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,12 +19,13 @@
namespace media {
namespace cast {
-class LoggingImpl {
+static const int kFrameIdUnknown = -1;
+// Should only be called from the main thread.
+class LoggingImpl : public base::NonThreadSafe {
public:
LoggingImpl(base::TickClock* clock,
- bool enable_data_collection,
- bool enable_uma_stats,
- bool enable_tracing);
+ scoped_refptr<base::TaskRunner> main_thread_proxy,
+ const CastLoggingConfig& config);
~LoggingImpl();
@@ -42,7 +45,7 @@ class LoggingImpl {
uint32 frame_id,
uint16 packet_id,
uint16 max_packet_id,
- int size);
+ size_t size);
void InsertGenericEvent(CastLoggingEvent event, int value);
// Get raw data.
@@ -57,11 +60,10 @@ class LoggingImpl {
void Reset();
private:
+ scoped_refptr<base::TaskRunner> main_thread_proxy_;
+ const CastLoggingConfig config_;
LoggingRaw raw_;
LoggingStats stats_;
- bool enable_data_collection_;
- bool enable_uma_stats_;
- bool enable_tracing_;
DISALLOW_COPY_AND_ASSIGN(LoggingImpl);
};
« no previous file with comments | « media/cast/logging/logging_defines.cc ('k') | media/cast/logging/logging_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698