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

Unified Diff: content/renderer/media/render_media_log.h

Issue 2064083002: media: Add Rappor reporting in MediaLog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more fixes Created 4 years, 6 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 | « no previous file | content/renderer/media/render_media_log.cc » ('j') | media/base/media_log.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/render_media_log.h
diff --git a/content/renderer/media/render_media_log.h b/content/renderer/media/render_media_log.h
index 3606b98e928fa5f50d8fa1f900075a80ceaa4cf2..e9b655aed4b85e360750c6ea6f850a9268265e4a 100644
--- a/content/renderer/media/render_media_log.h
+++ b/content/renderer/media/render_media_log.h
@@ -13,6 +13,7 @@
#include "base/time/time.h"
#include "content/common/content_export.h"
#include "media/base/media_log.h"
+#include "url/gurl.h"
namespace base {
class TickClock;
@@ -32,11 +33,12 @@ namespace content {
// It must be constructed on the render thread.
class CONTENT_EXPORT RenderMediaLog : public media::MediaLog {
public:
- RenderMediaLog();
+ explicit RenderMediaLog(const GURL& security_origin);
// MediaLog implementation.
void AddEvent(std::unique_ptr<media::MediaLogEvent> event) override;
std::string GetLastErrorMessage() override;
+ void RecordRapporWithSecurityOrigin(const std::string& metric) override;
// Will reset |last_ipc_send_time_| with the value of NowTicks().
void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock);
@@ -50,6 +52,9 @@ class CONTENT_EXPORT RenderMediaLog : public media::MediaLog {
// frequency.
void SendQueuedMediaEvents();
+ // Security origin of the current frame.
+ const GURL security_origin_;
+
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
// |lock_| protects access to all of the following member variables. It
« no previous file with comments | « no previous file | content/renderer/media/render_media_log.cc » ('j') | media/base/media_log.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698