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

Side by Side Diff: components/rappor/sampler.h

Issue 1099383002: Change ScopedPtrHashMap's 2nd template parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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 unified diff | Download patch
OLDNEW
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 <string> 9 #include <string>
10 10
(...skipping 23 matching lines...) Expand all
34 34
35 // Generate randomized reports for all stored samples and store them 35 // Generate randomized reports for all stored samples and store them
36 // in |reports|, then discard the samples. 36 // in |reports|, then discard the samples.
37 void ExportMetrics(const std::string& secret, RapporReports* reports); 37 void ExportMetrics(const std::string& secret, RapporReports* reports);
38 38
39 private: 39 private:
40 // The number of samples recorded for each metric since the last export. 40 // The number of samples recorded for each metric since the last export.
41 std::map<std::string, int> sample_counts_; 41 std::map<std::string, int> sample_counts_;
42 42
43 // Stores a Sample for each metric, by metric name. 43 // Stores a Sample for each metric, by metric name.
44 base::ScopedPtrHashMap<std::string, Sample> samples_; 44 base::ScopedPtrHashMap<std::string, scoped_ptr<Sample>> samples_;
45 45
46 DISALLOW_COPY_AND_ASSIGN(Sampler); 46 DISALLOW_COPY_AND_ASSIGN(Sampler);
47 }; 47 };
48 48
49 } // namespace internal 49 } // namespace internal
50 50
51 } // namespace rappor 51 } // namespace rappor
52 52
53 #endif // COMPONENTS_RAPPOR_SAMPLER_H_ 53 #endif // COMPONENTS_RAPPOR_SAMPLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698