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

Side by Side Diff: remoting/base/chromoting_event.cc

Issue 2418883002: [Remoting Android] Log app version for telemetry (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « remoting/base/chromoting_event.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "remoting/base/chromoting_event.h" 5 #include "remoting/base/chromoting_event.h"
6 6
7 #include "base/strings/stringize_macros.h"
7 #include "base/sys_info.h" 8 #include "base/sys_info.h"
8 9
9 namespace remoting { 10 namespace remoting {
10 11
12 const char ChromotingEvent::kWebAppVersionKey[] = "webapp_version";
11 const char ChromotingEvent::kCaptureLatencyKey[] = "capture_latency"; 13 const char ChromotingEvent::kCaptureLatencyKey[] = "capture_latency";
12 const char ChromotingEvent::kConnectionErrorKey[] = "connection_error"; 14 const char ChromotingEvent::kConnectionErrorKey[] = "connection_error";
13 const char ChromotingEvent::kCpuKey[] = "cpu"; 15 const char ChromotingEvent::kCpuKey[] = "cpu";
14 const char ChromotingEvent::kDecodeLatencyKey[] = "decode_latency"; 16 const char ChromotingEvent::kDecodeLatencyKey[] = "decode_latency";
15 const char ChromotingEvent::kEncodeLatencyKey[] = "encode_latency"; 17 const char ChromotingEvent::kEncodeLatencyKey[] = "encode_latency";
16 const char ChromotingEvent::kMaxCaptureLatencyKey[] = "max_capture_latency"; 18 const char ChromotingEvent::kMaxCaptureLatencyKey[] = "max_capture_latency";
17 const char ChromotingEvent::kMaxDecodeLatencyKey[] = "max_decode_latency"; 19 const char ChromotingEvent::kMaxDecodeLatencyKey[] = "max_decode_latency";
18 const char ChromotingEvent::kMaxEncodeLatencyKey[] = "max_encode_latency"; 20 const char ChromotingEvent::kMaxEncodeLatencyKey[] = "max_encode_latency";
19 const char ChromotingEvent::kMaxRenderLatencyKey[] = "max_render_latency"; 21 const char ChromotingEvent::kMaxRenderLatencyKey[] = "max_render_latency";
20 const char ChromotingEvent::kMaxRoundtripLatencyKey[] = "max_roundtrip_latency"; 22 const char ChromotingEvent::kMaxRoundtripLatencyKey[] = "max_roundtrip_latency";
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 values_map_->SetBoolean(key, value); 77 values_map_->SetBoolean(key, value);
76 } 78 }
77 79
78 void ChromotingEvent::SetDouble(const std::string& key, double value) { 80 void ChromotingEvent::SetDouble(const std::string& key, double value) {
79 values_map_->SetDouble(key, value); 81 values_map_->SetDouble(key, value);
80 } 82 }
81 83
82 void ChromotingEvent::AddSystemInfo() { 84 void ChromotingEvent::AddSystemInfo() {
83 SetString(kCpuKey, base::SysInfo::OperatingSystemArchitecture()); 85 SetString(kCpuKey, base::SysInfo::OperatingSystemArchitecture());
84 SetString(kOsVersionKey, base::SysInfo::OperatingSystemVersion()); 86 SetString(kOsVersionKey, base::SysInfo::OperatingSystemVersion());
85 std::string osName = base::SysInfo::OperatingSystemName(); 87 SetString(kWebAppVersionKey, STRINGIZE(VERSION));
Yuwei 2016/10/13 19:06:47 osName is no longer used. Probably forgot to remov
86 #if defined(OS_LINUX) 88 #if defined(OS_LINUX)
87 Os os = Os::CHROMOTING_LINUX; 89 Os os = Os::CHROMOTING_LINUX;
88 #elif defined(OS_CHROMEOS) 90 #elif defined(OS_CHROMEOS)
89 Os os = Os::CHROMOTING_CHROMEOS; 91 Os os = Os::CHROMOTING_CHROMEOS;
90 #elif defined(OS_MACOSX) 92 #elif defined(OS_MACOSX)
91 Os os = Os::CHROMOTING_MAC; 93 Os os = Os::CHROMOTING_MAC;
92 #elif defined(OS_WIN) 94 #elif defined(OS_WIN)
93 Os os = Os::CHROMOTING_WINDOWS; 95 Os os = Os::CHROMOTING_WINDOWS;
94 #elif defined(OS_ANDROID) 96 #elif defined(OS_ANDROID)
95 Os os = Os::CHROMOTING_ANDROID; 97 Os os = Os::CHROMOTING_ANDROID;
(...skipping 16 matching lines...) Expand all
112 114
113 // static 115 // static
114 bool ChromotingEvent::IsEndOfSession(SessionState state) { 116 bool ChromotingEvent::IsEndOfSession(SessionState state) {
115 return state == SessionState::CLOSED || 117 return state == SessionState::CLOSED ||
116 state == SessionState::CONNECTION_DROPPED || 118 state == SessionState::CONNECTION_DROPPED ||
117 state == SessionState::CONNECTION_FAILED || 119 state == SessionState::CONNECTION_FAILED ||
118 state == SessionState::CONNECTION_CANCELED; 120 state == SessionState::CONNECTION_CANCELED;
119 } 121 }
120 122
121 } // namespace remoting 123 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/base/chromoting_event.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698