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

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

Issue 2910513002: [CRD iOS] Fix telemetry issues (Closed)
Patch Set: Resolve feedback Created 3 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
« no previous file with comments | « no previous file | remoting/ios/domain/host_info.h » ('j') | 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/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "base/strings/stringize_macros.h" 8 #include "base/strings/stringize_macros.h"
9 #include "base/sys_info.h" 9 #include "base/sys_info.h"
10 #include "remoting/base/name_value_map.h" 10 #include "remoting/base/name_value_map.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 101
102 void ChromotingEvent::AddSystemInfo() { 102 void ChromotingEvent::AddSystemInfo() {
103 SetString(kCpuKey, base::SysInfo::OperatingSystemArchitecture()); 103 SetString(kCpuKey, base::SysInfo::OperatingSystemArchitecture());
104 SetString(kOsVersionKey, base::SysInfo::OperatingSystemVersion()); 104 SetString(kOsVersionKey, base::SysInfo::OperatingSystemVersion());
105 SetString(kWebAppVersionKey, STRINGIZE(VERSION)); 105 SetString(kWebAppVersionKey, STRINGIZE(VERSION));
106 #if defined(OS_LINUX) 106 #if defined(OS_LINUX)
107 Os os = Os::CHROMOTING_LINUX; 107 Os os = Os::CHROMOTING_LINUX;
108 #elif defined(OS_CHROMEOS) 108 #elif defined(OS_CHROMEOS)
109 Os os = Os::CHROMOTING_CHROMEOS; 109 Os os = Os::CHROMOTING_CHROMEOS;
110 #elif defined(OS_IOS)
111 // This needs to precede the OS_MACOSX check since iOS will also define the
112 // OS_MACOSX macro.
113 Os os = Os::CHROMOTING_IOS;
110 #elif defined(OS_MACOSX) 114 #elif defined(OS_MACOSX)
111 Os os = Os::CHROMOTING_MAC; 115 Os os = Os::CHROMOTING_MAC;
112 #elif defined(OS_WIN) 116 #elif defined(OS_WIN)
113 Os os = Os::CHROMOTING_WINDOWS; 117 Os os = Os::CHROMOTING_WINDOWS;
114 #elif defined(OS_ANDROID) 118 #elif defined(OS_ANDROID)
115 Os os = Os::CHROMOTING_ANDROID; 119 Os os = Os::CHROMOTING_ANDROID;
116 #elif defined(OS_IOS)
117 Os os = Os::CHROMOTING_IOS;
118 #else 120 #else
119 Os os = Os::OTHER; 121 Os os = Os::OTHER;
120 #endif 122 #endif
121 SetEnum(kOsKey, os); 123 SetEnum(kOsKey, os);
122 } 124 }
123 125
124 void ChromotingEvent::IncrementSendAttempts() { 126 void ChromotingEvent::IncrementSendAttempts() {
125 send_attempts_++; 127 send_attempts_++;
126 } 128 }
127 129
(...skipping 14 matching lines...) Expand all
142 ChromotingEvent::Os ChromotingEvent::ParseOsFromString(const std::string& os) { 144 ChromotingEvent::Os ChromotingEvent::ParseOsFromString(const std::string& os) {
143 ChromotingEvent::Os result; 145 ChromotingEvent::Os result;
144 if (!NameToValue(kOsNames, base::ToLowerASCII(os), &result)) { 146 if (!NameToValue(kOsNames, base::ToLowerASCII(os), &result)) {
145 return Os::OTHER; 147 return Os::OTHER;
146 } 148 }
147 149
148 return result; 150 return result;
149 } 151 }
150 152
151 } // namespace remoting 153 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/ios/domain/host_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698