OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_RAPPOR_RAPPOR_RECORDER_IMPL_H_ |
| 6 #define COMPONENTS_RAPPOR_RAPPOR_RECORDER_IMPL_H_ |
| 7 |
| 8 #include "base/threading/thread_checker.h" |
| 9 #include "components/rappor/public/interfaces/rappor_recorder.mojom.h" |
| 10 |
| 11 class GURL; |
| 12 |
| 13 namespace rappor { |
| 14 |
| 15 class RapporService; |
| 16 |
| 17 // Records aggregate, privacy-preserving samples from the renderers. |
| 18 // See https://www.chromium.org/developers/design-documents/rappor |
| 19 class RapporRecorderImpl : public mojom::RapporRecorder { |
| 20 public: |
| 21 explicit RapporRecorderImpl(RapporService* rappor_service); |
| 22 ~RapporRecorderImpl() override; |
| 23 |
| 24 static void Create(RapporService* rappor_service, |
| 25 mojom::RapporRecorderRequest request); |
| 26 |
| 27 private: |
| 28 // rappor::mojom::RapporRecorder: |
| 29 void RecordRappor(const std::string& metric, |
| 30 const std::string& sample) override; |
| 31 void RecordRapporURL(const std::string& metric, const GURL& sample) override; |
| 32 |
| 33 RapporService* rappor_service_; |
| 34 base::ThreadChecker thread_checker_; |
| 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(RapporRecorderImpl); |
| 37 }; |
| 38 |
| 39 } // namespace rappor |
| 40 |
| 41 #endif // COMPONENTS_RAPPOR_RAPPOR_RECORDER_IMPL_H_ |
OLD | NEW |