Commit 94bc8b95 authored by imcheng@chromium.org's avatar imcheng@chromium.org

Cast: Add GeneralDescription proto to LogMetadata and populate it when

getting the logs. The current fields (os, product, product version) is
populated using chrome_version_info.h.

Review URL: https://codereview.chromium.org/317823008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275526 0039d316-1c4b-4281-b951-d872f2087c98
parent 473eccc8
......@@ -7,6 +7,7 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/message_loop/message_loop_proxy.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/renderer/media/cast_threads.h"
#include "chrome/renderer/media/cast_transport_sender_ipc.h"
#include "content/public/renderer/render_thread.h"
......@@ -144,6 +145,12 @@ void CastSessionDelegate::GetEventLogsAndReset(
if (!extra_data.empty())
metadata.set_extra_data(extra_data);
media::cast::proto::GeneralDescription* gen_desc =
metadata.mutable_general_description();
chrome::VersionInfo version_info;
gen_desc->set_product(version_info.Name());
gen_desc->set_product_version(version_info.Version());
gen_desc->set_os(version_info.OSType());
scoped_ptr<char[]> serialized_log(new char[media::cast::kMaxSerializedBytes]);
int output_bytes;
......
......@@ -68,6 +68,14 @@ enum EventType {
PACKET_RECEIVED = 38;
}
// Contains information independent of the stream that describes the system
// setup, e.g. OS and hardware info.
message GeneralDescription {
optional string product = 1;
optional string product_version = 2;
optional string os = 3;
}
// Each log will contain one |LogMetadata|.
message LogMetadata {
// |true| if the events are related to audio. |false| if they are related to
......@@ -90,9 +98,11 @@ message LogMetadata {
// to a real time and date.
optional int64 reference_timestamp_ms_at_unix_epoch = 5;
// Extra data to attach to the log, e.g. system info or
// experiment tags, in key-value JSON string format.
// Extra data to attach to the log, e.g. experiment tags,
// in key-value JSON string format. The data is supplied by the application.
optional string extra_data = 6;
optional GeneralDescription general_description = 7;
}
message AggregatedFrameEvent {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment