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

Unified Diff: components/metrics/persistent_system_profile_unittest.cc

Issue 2918533003: Send metrics with embedded system profiles after system startup. (Closed)
Patch Set: addressed final review comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/metrics/persistent_system_profile.cc ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/persistent_system_profile_unittest.cc
diff --git a/components/metrics/persistent_system_profile_unittest.cc b/components/metrics/persistent_system_profile_unittest.cc
index 93f297a81cddb017b7dd96058f56d29017f62bc9..5ca4e898637f28e3a37e043b7a756afecea06dee 100644
--- a/components/metrics/persistent_system_profile_unittest.cc
+++ b/components/metrics/persistent_system_profile_unittest.cc
@@ -91,11 +91,10 @@ TEST_F(PersistentSystemProfileTest, ProfileStorage) {
trial->set_name_id(123);
trial->set_group_id(456);
- std::string serialized_proto;
- ASSERT_TRUE(proto1.SerializeToString(&serialized_proto));
- persistent_profile()->SetSystemProfile(serialized_proto);
+ persistent_profile()->SetSystemProfile(proto1);
SystemProfileProto proto2;
+ ASSERT_TRUE(PersistentSystemProfile::HasSystemProfile(*memory_allocator()));
ASSERT_TRUE(
PersistentSystemProfile::GetSystemProfile(*memory_allocator(), &proto2));
ASSERT_EQ(1, proto2.field_trial_size());
@@ -108,8 +107,7 @@ TEST_F(PersistentSystemProfileTest, ProfileStorage) {
trial->set_name_id(78);
trial->set_group_id(90);
- ASSERT_TRUE(proto1.SerializeToString(&serialized_proto));
- persistent_profile()->SetSystemProfile(serialized_proto);
+ persistent_profile()->SetSystemProfile(proto1);
ASSERT_TRUE(
PersistentSystemProfile::GetSystemProfile(*memory_allocator(), &proto2));
« no previous file with comments | « components/metrics/persistent_system_profile.cc ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698