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

Unified Diff: components/rappor/rappor_parameters.cc

Issue 49753002: RAPPOR implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: RapporMetrics StatsTest Created 6 years, 11 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
Index: components/rappor/rappor_parameters.cc
diff --git a/components/rappor/rappor_parameters.cc b/components/rappor/rappor_parameters.cc
new file mode 100644
index 0000000000000000000000000000000000000000..02d9b1f551ad08229f6acb4b57dfca7de90224ca
--- /dev/null
+++ b/components/rappor/rappor_parameters.cc
@@ -0,0 +1,38 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/rappor/rappor_parameters.h"
+
+namespace rappor {
+
+std::ostream& operator<<(std::ostream& out, const RapporParameters& rhs) {
+ return out
+ << rhs.rappor_name
+ << " "
+ << rhs.bloom_filter_size_bytes
+ << " "
+ << rhs.bloom_filter_hash_function_count
+ << " "
+ << rhs.fake_prob
+ << " "
+ << rhs.fake_one_prob
+ << " "
+ << rhs.one_coin_prob
+ << " "
+ << rhs.zero_coin_prob;
+}
+
+
+bool operator==(const RapporParameters& lhs, const RapporParameters& rhs) {
+ return lhs.rappor_name == rhs.rappor_name &&
+ lhs.bloom_filter_size_bytes == rhs.bloom_filter_size_bytes &&
+ lhs.bloom_filter_hash_function_count ==
+ rhs.bloom_filter_hash_function_count &&
+ lhs.fake_prob == rhs.fake_prob &&
+ lhs.fake_one_prob == rhs.fake_one_prob &&
+ lhs.one_coin_prob == rhs.one_coin_prob &&
+ lhs.zero_coin_prob == rhs.zero_coin_prob;
+}
+
+} // namespace rappor

Powered by Google App Engine
This is Rietveld 408576698