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

Unified Diff: components/rappor/test_rappor_service.cc

Issue 2492793004: Add TimeToScrollUpdateSwapBegin2 in RAPPOR (Closed)
Patch Set: add tests Created 4 years 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/rappor/test_rappor_service.h ('k') | content/browser/renderer_host/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/rappor/test_rappor_service.cc
diff --git a/components/rappor/test_rappor_service.cc b/components/rappor/test_rappor_service.cc
index 8689873d68142b5efc1878755e67f7fde673f8d7..62da6f9c29bbb7676c68630833d6b6d68374f396 100644
--- a/components/rappor/test_rappor_service.cc
+++ b/components/rappor/test_rappor_service.cc
@@ -42,12 +42,21 @@ void TestSample::SetFlagsField(const std::string& field_name,
Sample::SetFlagsField(field_name, flags, num_flags);
}
+void TestSample::SetUInt64Field(const std::string& field_name,
+ uint64_t value,
+ NoiseLevel noise_level) {
+ shadow_.uint64_fields[field_name] =
+ std::pair<std::uint64_t, NoiseLevel>(value, noise_level);
+ Sample::SetUInt64Field(field_name, value, noise_level);
+}
+
TestSample::Shadow::Shadow(RapporType type) : type(type) {}
TestSample::Shadow::Shadow(const TestSample::Shadow& other) {
type = other.type;
flag_fields = other.flag_fields;
string_fields = other.string_fields;
+ uint64_fields = other.uint64_fields;
}
TestSample::Shadow::~Shadow() {}
« no previous file with comments | « components/rappor/test_rappor_service.h ('k') | content/browser/renderer_host/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698