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

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

Issue 2860093004: 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 | « components/metrics/metrics_log.cc ('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 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 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 SystemProfileProto* system_profile = expected.mutable_system_profile(); 189 SystemProfileProto* system_profile = expected.mutable_system_profile();
190 system_profile->set_app_version("bogus version"); 190 system_profile->set_app_version("bogus version");
191 system_profile->set_channel(client.GetChannel()); 191 system_profile->set_channel(client.GetChannel());
192 system_profile->set_application_locale(client.GetApplicationLocale()); 192 system_profile->set_application_locale(client.GetApplicationLocale());
193 193
194 #if defined(SYZYASAN) 194 #if defined(SYZYASAN)
195 system_profile->set_is_asan_build(true); 195 system_profile->set_is_asan_build(true);
196 #endif 196 #endif
197 metrics::SystemProfileProto::Hardware* hardware = 197 metrics::SystemProfileProto::Hardware* hardware =
198 system_profile->mutable_hardware(); 198 system_profile->mutable_hardware();
199 #if !defined(OS_IOS)
200 hardware->set_cpu_architecture(base::SysInfo::OperatingSystemArchitecture()); 199 hardware->set_cpu_architecture(base::SysInfo::OperatingSystemArchitecture());
201 #endif
202 hardware->set_system_ram_mb(base::SysInfo::AmountOfPhysicalMemoryMB()); 200 hardware->set_system_ram_mb(base::SysInfo::AmountOfPhysicalMemoryMB());
203 hardware->set_hardware_class(base::SysInfo::HardwareModelName()); 201 hardware->set_hardware_class(base::SysInfo::HardwareModelName());
204 #if defined(OS_WIN) 202 #if defined(OS_WIN)
205 hardware->set_dll_base(reinterpret_cast<uint64_t>(CURRENT_MODULE())); 203 hardware->set_dll_base(reinterpret_cast<uint64_t>(CURRENT_MODULE()));
206 #endif 204 #endif
207 205
208 system_profile->mutable_os()->set_name(base::SysInfo::OperatingSystemName()); 206 system_profile->mutable_os()->set_name(base::SysInfo::OperatingSystemName());
209 system_profile->mutable_os()->set_version( 207 system_profile->mutable_os()->set_version(
210 base::SysInfo::OperatingSystemVersion()); 208 base::SysInfo::OperatingSystemVersion());
211 #if defined(OS_ANDROID) 209 #if defined(OS_ANDROID)
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 TestMetricsServiceClient client; 405 TestMetricsServiceClient client;
408 client.set_product(kTestProduct); 406 client.set_product(kTestProduct);
409 TestMetricsLog log( 407 TestMetricsLog log(
410 kClientId, kSessionId, MetricsLog::ONGOING_LOG, &client, &prefs_); 408 kClientId, kSessionId, MetricsLog::ONGOING_LOG, &client, &prefs_);
411 // Check that the product is set to |kTestProduct|. 409 // Check that the product is set to |kTestProduct|.
412 EXPECT_TRUE(log.uma_proto().has_product()); 410 EXPECT_TRUE(log.uma_proto().has_product());
413 EXPECT_EQ(kTestProduct, log.uma_proto().product()); 411 EXPECT_EQ(kTestProduct, log.uma_proto().product());
414 } 412 }
415 413
416 } // namespace metrics 414 } // namespace metrics
OLDNEW
« no previous file with comments | « components/metrics/metrics_log.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698