OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_SAMPLER_H_ | 5 #ifndef COMPONENTS_RAPPOR_SAMPLER_H_ |
6 #define COMPONENTS_RAPPOR_SAMPLER_H_ | 6 #define COMPONENTS_RAPPOR_SAMPLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/containers/scoped_ptr_hash_map.h" | 12 #include "base/containers/scoped_ptr_hash_map.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "components/rappor/rappor_parameters.h" | 14 #include "components/rappor/public/rappor_parameters.h" |
15 #include "components/rappor/sample.h" | 15 #include "components/rappor/public/sample.h" |
16 | 16 |
17 namespace rappor { | 17 namespace rappor { |
18 | 18 |
19 class RapporReports; | 19 class RapporReports; |
20 | 20 |
21 namespace internal { | 21 namespace internal { |
22 | 22 |
23 // Sampler manages the collection and storage of Sample objects. | 23 // Sampler manages the collection and storage of Sample objects. |
24 // For each metric name, it will randomly select one Sample to store and | 24 // For each metric name, it will randomly select one Sample to store and |
25 // use when generating RapporReports. | 25 // use when generating RapporReports. |
(...skipping 19 matching lines...) Expand all Loading... |
45 base::ScopedPtrHashMap<std::string, std::unique_ptr<Sample>> samples_; | 45 base::ScopedPtrHashMap<std::string, std::unique_ptr<Sample>> samples_; |
46 | 46 |
47 DISALLOW_COPY_AND_ASSIGN(Sampler); | 47 DISALLOW_COPY_AND_ASSIGN(Sampler); |
48 }; | 48 }; |
49 | 49 |
50 } // namespace internal | 50 } // namespace internal |
51 | 51 |
52 } // namespace rappor | 52 } // namespace rappor |
53 | 53 |
54 #endif // COMPONENTS_RAPPOR_SAMPLER_H_ | 54 #endif // COMPONENTS_RAPPOR_SAMPLER_H_ |
OLD | NEW |