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

Unified Diff: components/rappor/rappor_recorder_impl.h

Issue 2376403003: Convert RapporRecorder to use mojo. (Closed)
Patch Set: Convert RapporRecorder to use mojo. Created 4 years, 2 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_recorder_impl.h
diff --git a/components/rappor/rappor_recorder_impl.h b/components/rappor/rappor_recorder_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..d558a274c87afecda6019745e295f1dfb627d310
--- /dev/null
+++ b/components/rappor/rappor_recorder_impl.h
@@ -0,0 +1,41 @@
+// Copyright 2016 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.
+
+#ifndef COMPONENTS_RAPPOR_RAPPOR_RECORDER_IMPL_H_
+#define COMPONENTS_RAPPOR_RAPPOR_RECORDER_IMPL_H_
+
+#include "base/threading/thread_checker.h"
+#include "components/rappor/public/interfaces/rappor_recorder.mojom.h"
+
+class GURL;
+
+namespace rappor {
+
+class RapporService;
+
+// Records aggregate, privacy-preserving samples from the renderers.
+// See https://www.chromium.org/developers/design-documents/rappor
+class RapporRecorderImpl : public mojom::RapporRecorder {
+ public:
+ explicit RapporRecorderImpl(RapporService* rappor_service);
+ ~RapporRecorderImpl() override;
+
+ static void Create(RapporService* rappor_service,
+ mojom::RapporRecorderRequest request);
+
+ private:
+ // rappor::mojom::RapporRecorder:
+ void RecordRappor(const std::string& metric,
+ const std::string& sample) override;
+ void RecordRapporURL(const std::string& metric, const GURL& sample) override;
+
+ RapporService* rappor_service_;
+ base::ThreadChecker thread_checker_;
+
+ DISALLOW_COPY_AND_ASSIGN(RapporRecorderImpl);
+};
+
+} // namespace rappor
+
+#endif // COMPONENTS_RAPPOR_RAPPOR_RECORDER_IMPL_H_
« no previous file with comments | « components/rappor/public/interfaces/rappor_recorder.mojom ('k') | components/rappor/rappor_recorder_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698