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

Side by Side Diff: media/base/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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_MEDIA_LOG_H_ 5 #ifndef MEDIA_BASE_MEDIA_LOG_H_
6 #define MEDIA_BASE_MEDIA_LOG_H_ 6 #define MEDIA_BASE_MEDIA_LOG_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 29 matching lines...) Expand all
40 40
41 MediaLog(); 41 MediaLog();
42 42
43 // Add an event to this log. Overriden by inheritors to actually do something 43 // Add an event to this log. Overriden by inheritors to actually do something
44 // with it. 44 // with it.
45 virtual void AddEvent(std::unique_ptr<MediaLogEvent> event); 45 virtual void AddEvent(std::unique_ptr<MediaLogEvent> event);
46 46
47 // Retrieve an error message, if any. 47 // Retrieve an error message, if any.
48 virtual std::string GetLastErrorMessage(); 48 virtual std::string GetLastErrorMessage();
49 49
50 // Records the domain and registry of the current frame security origin to a
51 // Rappor privacy-preserving metric. See:
52 // https://www.chromium.org/developers/design-documents/rappor
53 virtual void RecordRapporWithSecurityOrigin(const std::string& metric);
xhwang 2016/06/15 00:19:07 Reporting security origin is consistent with our e
DaleCurtis 2016/06/15 00:33:47 I think this is better for now, as the player url
54
50 // Helper methods to create events and their parameters. 55 // Helper methods to create events and their parameters.
51 std::unique_ptr<MediaLogEvent> CreateEvent(MediaLogEvent::Type type); 56 std::unique_ptr<MediaLogEvent> CreateEvent(MediaLogEvent::Type type);
52 std::unique_ptr<MediaLogEvent> CreateBooleanEvent(MediaLogEvent::Type type, 57 std::unique_ptr<MediaLogEvent> CreateBooleanEvent(MediaLogEvent::Type type,
53 const std::string& property, 58 const std::string& property,
54 bool value); 59 bool value);
55 std::unique_ptr<MediaLogEvent> CreateStringEvent(MediaLogEvent::Type type, 60 std::unique_ptr<MediaLogEvent> CreateStringEvent(MediaLogEvent::Type type,
56 const std::string& property, 61 const std::string& property,
57 const std::string& value); 62 const std::string& value);
58 std::unique_ptr<MediaLogEvent> CreateTimeEvent(MediaLogEvent::Type type, 63 std::unique_ptr<MediaLogEvent> CreateTimeEvent(MediaLogEvent::Type type,
59 const std::string& property, 64 const std::string& property,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 #define LIMITED_MEDIA_LOG(level, media_log, count, max) \ 130 #define LIMITED_MEDIA_LOG(level, media_log, count, max) \
126 LAZY_STREAM(MEDIA_LOG(level, media_log), \ 131 LAZY_STREAM(MEDIA_LOG(level, media_log), \
127 (count) < (max) && ((count)++ || true)) \ 132 (count) < (max) && ((count)++ || true)) \
128 << (((count) == (max)) ? "(Log limit reached. Further similar entries " \ 133 << (((count) == (max)) ? "(Log limit reached. Further similar entries " \
129 "may be suppressed): " \ 134 "may be suppressed): " \
130 : "") 135 : "")
131 136
132 } // namespace media 137 } // namespace media
133 138
134 #endif // MEDIA_BASE_MEDIA_LOG_H_ 139 #endif // MEDIA_BASE_MEDIA_LOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698