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