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

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

Issue 2863143002: Revert of Don't set cpu architecture field on iOS in UMA logs. (patchset #2 id:20001 of https://cod… (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 <string> 10 #include <string>
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 system_profile->set_app_version(client->GetVersionString()); 144 system_profile->set_app_version(client->GetVersionString());
145 system_profile->set_channel(client->GetChannel()); 145 system_profile->set_channel(client->GetChannel());
146 system_profile->set_application_locale(client->GetApplicationLocale()); 146 system_profile->set_application_locale(client->GetApplicationLocale());
147 147
148 #if defined(SYZYASAN) 148 #if defined(SYZYASAN)
149 system_profile->set_is_asan_build(true); 149 system_profile->set_is_asan_build(true);
150 #endif 150 #endif
151 151
152 metrics::SystemProfileProto::Hardware* hardware = 152 metrics::SystemProfileProto::Hardware* hardware =
153 system_profile->mutable_hardware(); 153 system_profile->mutable_hardware();
154 #if !defined(OS_IOS)
155 // On iOS, OperatingSystemArchitecture() returns values like iPad4,4 which is
156 // not the actual CPU architecture. Don't set it until the API is fixed. See
157 // crbug.com/370104 for details.
158 hardware->set_cpu_architecture(base::SysInfo::OperatingSystemArchitecture()); 154 hardware->set_cpu_architecture(base::SysInfo::OperatingSystemArchitecture());
159 #endif
160 hardware->set_system_ram_mb(base::SysInfo::AmountOfPhysicalMemoryMB()); 155 hardware->set_system_ram_mb(base::SysInfo::AmountOfPhysicalMemoryMB());
161 hardware->set_hardware_class(base::SysInfo::HardwareModelName()); 156 hardware->set_hardware_class(base::SysInfo::HardwareModelName());
162 #if defined(OS_WIN) 157 #if defined(OS_WIN)
163 hardware->set_dll_base(reinterpret_cast<uint64_t>(CURRENT_MODULE())); 158 hardware->set_dll_base(reinterpret_cast<uint64_t>(CURRENT_MODULE()));
164 #endif 159 #endif
165 160
166 metrics::SystemProfileProto::OS* os = system_profile->mutable_os(); 161 metrics::SystemProfileProto::OS* os = system_profile->mutable_os();
167 os->set_name(base::SysInfo::OperatingSystemName()); 162 os->set_name(base::SysInfo::OperatingSystemName());
168 os->set_version(base::SysInfo::OperatingSystemVersion()); 163 os->set_version(base::SysInfo::OperatingSystemVersion());
169 #if defined(OS_ANDROID) 164 #if defined(OS_ANDROID)
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 DCHECK(!closed_); 317 DCHECK(!closed_);
323 closed_ = true; 318 closed_ = true;
324 } 319 }
325 320
326 void MetricsLog::GetEncodedLog(std::string* encoded_log) { 321 void MetricsLog::GetEncodedLog(std::string* encoded_log) {
327 DCHECK(closed_); 322 DCHECK(closed_);
328 uma_proto_.SerializeToString(encoded_log); 323 uma_proto_.SerializeToString(encoded_log);
329 } 324 }
330 325
331 } // namespace metrics 326 } // 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