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

Side by Side Diff: components/metrics/metrics_log.cc

Issue 2855943005: Revert of Don't set cpu architecture field on iOS in UMA logs. (Closed)
Patch Set: Created 3 years, 7 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 | components/metrics/metrics_log_unittest.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/metrics/metrics_log.h" 5 #include "components/metrics/metrics_log.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 system_profile->set_app_version(client->GetVersionString()); 170 system_profile->set_app_version(client->GetVersionString());
171 system_profile->set_channel(client->GetChannel()); 171 system_profile->set_channel(client->GetChannel());
172 system_profile->set_application_locale(client->GetApplicationLocale()); 172 system_profile->set_application_locale(client->GetApplicationLocale());
173 173
174 #if defined(SYZYASAN) 174 #if defined(SYZYASAN)
175 system_profile->set_is_asan_build(true); 175 system_profile->set_is_asan_build(true);
176 #endif 176 #endif
177 177
178 metrics::SystemProfileProto::Hardware* hardware = 178 metrics::SystemProfileProto::Hardware* hardware =
179 system_profile->mutable_hardware(); 179 system_profile->mutable_hardware();
180 #if !defined(OS_IOS)
181 // On iOS, OperatingSystemArchitecture() returns values like iPad4,4 which is
182 // not the actual CPU architecture. Don't set it until the API is fixed. See
183 // crbug.com/370104 for details.
184 hardware->set_cpu_architecture(base::SysInfo::OperatingSystemArchitecture()); 180 hardware->set_cpu_architecture(base::SysInfo::OperatingSystemArchitecture());
185 #endif
186 hardware->set_system_ram_mb(base::SysInfo::AmountOfPhysicalMemoryMB()); 181 hardware->set_system_ram_mb(base::SysInfo::AmountOfPhysicalMemoryMB());
187 hardware->set_hardware_class(base::SysInfo::HardwareModelName()); 182 hardware->set_hardware_class(base::SysInfo::HardwareModelName());
188 #if defined(OS_WIN) 183 #if defined(OS_WIN)
189 hardware->set_dll_base(reinterpret_cast<uint64_t>(CURRENT_MODULE())); 184 hardware->set_dll_base(reinterpret_cast<uint64_t>(CURRENT_MODULE()));
190 #endif 185 #endif
191 186
192 metrics::SystemProfileProto::OS* os = system_profile->mutable_os(); 187 metrics::SystemProfileProto::OS* os = system_profile->mutable_os();
193 os->set_name(base::SysInfo::OperatingSystemName()); 188 os->set_name(base::SysInfo::OperatingSystemName());
194 os->set_version(base::SysInfo::OperatingSystemVersion()); 189 os->set_version(base::SysInfo::OperatingSystemVersion());
195 #if defined(OS_ANDROID) 190 #if defined(OS_ANDROID)
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 DCHECK(!closed_); 457 DCHECK(!closed_);
463 closed_ = true; 458 closed_ = true;
464 } 459 }
465 460
466 void MetricsLog::GetEncodedLog(std::string* encoded_log) { 461 void MetricsLog::GetEncodedLog(std::string* encoded_log) {
467 DCHECK(closed_); 462 DCHECK(closed_);
468 uma_proto_.SerializeToString(encoded_log); 463 uma_proto_.SerializeToString(encoded_log);
469 } 464 }
470 465
471 } // namespace metrics 466 } // namespace metrics
OLDNEW
« no previous file with comments | « no previous file | components/metrics/metrics_log_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698