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

Unified Diff: remoting/client/client_telemetry_logger.cc

Issue 2629593003: [Chromoting.com] Make Android telemetry report host version/os/os version (Closed)
Patch Set: PTAL Point Created 3 years, 11 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 | « remoting/client/client_telemetry_logger.h ('k') | remoting/client/jni/chromoting_jni_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/client_telemetry_logger.cc
diff --git a/remoting/client/client_telemetry_logger.cc b/remoting/client/client_telemetry_logger.cc
index 45c3b6a36e2b0160fa5238669b097b82605577c6..7d47d10f5b28681b424d524c8cd9cd15e52a3eff 100644
--- a/remoting/client/client_telemetry_logger.cc
+++ b/remoting/client/client_telemetry_logger.cc
@@ -20,11 +20,23 @@ const int kMaxSessionIdAgeDays = 1;
namespace remoting {
+struct ClientTelemetryLogger::HostInfo {
+ const std::string host_version;
+ const ChromotingEvent::Os host_os;
+ const std::string host_os_version;
+};
+
ClientTelemetryLogger::ClientTelemetryLogger(ChromotingEvent::Mode mode)
: mode_(mode) {}
ClientTelemetryLogger::~ClientTelemetryLogger() {}
+void ClientTelemetryLogger::SetHostInfo(const std::string& host_version,
+ ChromotingEvent::Os host_os,
+ const std::string& host_os_version) {
+ host_info_.reset(new HostInfo{host_version, host_os, host_os_version});
+}
+
void ClientTelemetryLogger::Start(
std::unique_ptr<UrlRequestFactory> request_factory,
const std::string& telemetry_base_url) {
@@ -152,6 +164,13 @@ ChromotingEvent::ConnectionError ClientTelemetryLogger::TranslateError(
void ClientTelemetryLogger::FillEventContext(ChromotingEvent* event) const {
event->SetEnum(ChromotingEvent::kModeKey, mode_);
event->SetEnum(ChromotingEvent::kRoleKey, ChromotingEvent::Role::CLIENT);
+ if (host_info_) {
+ event->SetString(ChromotingEvent::kHostVersionKey,
+ host_info_->host_version);
+ event->SetEnum(ChromotingEvent::kHostOsKey, host_info_->host_os);
+ event->SetString(ChromotingEvent::kHostOsVersionKey,
+ host_info_->host_os_version);
+ }
event->AddSystemInfo();
if (!session_id_.empty()) {
event->SetString(ChromotingEvent::kSessionIdKey, session_id_);
« no previous file with comments | « remoting/client/client_telemetry_logger.h ('k') | remoting/client/jni/chromoting_jni_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698