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

Unified Diff: remoting/client/client_telemetry_logger.h

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/base/chromoting_event.cc ('k') | remoting/client/client_telemetry_logger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/client_telemetry_logger.h
diff --git a/remoting/client/client_telemetry_logger.h b/remoting/client/client_telemetry_logger.h
index 3f7445afd621ba98ed3da90e5ba4910daa57421e..9cfbb093116590666a336bf6aa32bede793c028a 100644
--- a/remoting/client/client_telemetry_logger.h
+++ b/remoting/client/client_telemetry_logger.h
@@ -22,11 +22,18 @@ namespace remoting {
// ClientTelemetryLogger sends client log entries to the telemetry server.
// The logger should be run entirely on one single thread.
// TODO(yuweih): Implement new features that session_logger.js provides.
+// TODO(BUG 680752): Refactor this so that it's bound to only one session.
class ClientTelemetryLogger {
public:
explicit ClientTelemetryLogger(ChromotingEvent::Mode mode);
~ClientTelemetryLogger();
+ // Sets the host info to be posted along with other log data. By default
+ // no host info will be logged.
+ void SetHostInfo(const std::string& host_version,
+ ChromotingEvent::Os host_os,
+ const std::string& host_os_version);
+
// Start must be called before posting logs or setting auth token or closure.
void Start(std::unique_ptr<UrlRequestFactory> request_factory,
const std::string& telemetry_base_url);
@@ -65,6 +72,7 @@ class ClientTelemetryLogger {
protocol::ErrorCode state);
private:
+ struct HostInfo;
void FillEventContext(ChromotingEvent* event) const;
@@ -92,6 +100,8 @@ class ClientTelemetryLogger {
ChromotingEvent::Mode mode_;
+ std::unique_ptr<HostInfo> host_info_;
+
// The log writer that actually sends log to the server.
std::unique_ptr<ChromotingEventLogWriter> log_writer_;
« no previous file with comments | « remoting/base/chromoting_event.cc ('k') | remoting/client/client_telemetry_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698