Index: components/rappor/rappor.cc |
diff --git a/components/rappor/rappor.cc b/components/rappor/rappor.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5aa62b511a68e792db4d6b4dd40a52af8b1afa5b |
--- /dev/null |
+++ b/components/rappor/rappor.cc |
@@ -0,0 +1,22 @@ |
+// Copyright (c) 2012 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.h" |
+ |
+namespace rappor { |
+ |
+Rappor::Rappor(const RapporParameters* parameters) |
+ : parameters_(parameters), |
+ bloom_(parameters->bloom_filter_size_bytes, |
+ parameters->bloom_filter_hash_count) {} |
+ |
+void Rappor::AddSamples(const std::vector<std::string>& strings) { |
+ bloom_.AddStrings(strings); |
+} |
+ |
+void Rappor::AddSample(const std::string& str) { bloom_.AddString(str); } |
+ |
+const ByteVector& Rappor::GetBytes() const { return bloom_.bytes(); } |
+ |
+} // namespace rappor |