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

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

Issue 1921923002: Convert //components/[o-t]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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
« no previous file with comments | « components/rappor/sampler_unittest.cc ('k') | components/rappor/test_rappor_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_TEST_RAPPOR_SERVICE_H_ 5 #ifndef COMPONENTS_RAPPOR_TEST_RAPPOR_SERVICE_H_
6 #define COMPONENTS_RAPPOR_TEST_RAPPOR_SERVICE_H_ 6 #define COMPONENTS_RAPPOR_TEST_RAPPOR_SERVICE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // This class provides a simple instance that can be instantiated by tests 51 // This class provides a simple instance that can be instantiated by tests
52 // and examined to check that metrics were recorded. It assumes the most 52 // and examined to check that metrics were recorded. It assumes the most
53 // permissive settings so that any metric can be recorded. 53 // permissive settings so that any metric can be recorded.
54 class TestRapporService : public RapporService { 54 class TestRapporService : public RapporService {
55 public: 55 public:
56 TestRapporService(); 56 TestRapporService();
57 57
58 ~TestRapporService() override; 58 ~TestRapporService() override;
59 59
60 // RapporService: 60 // RapporService:
61 scoped_ptr<Sample> CreateSample(RapporType type) override; 61 std::unique_ptr<Sample> CreateSample(RapporType type) override;
62 void RecordSampleObj(const std::string& metric_name, 62 void RecordSampleObj(const std::string& metric_name,
63 scoped_ptr<Sample> sample) override; 63 std::unique_ptr<Sample> sample) override;
64 void RecordSample(const std::string& metric_name, 64 void RecordSample(const std::string& metric_name,
65 RapporType type, 65 RapporType type,
66 const std::string& sample) override; 66 const std::string& sample) override;
67 67
68 // Gets the number of reports that would be uploaded by this service. 68 // Gets the number of reports that would be uploaded by this service.
69 // This also clears the internal map of metrics as a biproduct, so if 69 // This also clears the internal map of metrics as a biproduct, so if
70 // comparing numbers of reports, the comparison should be from the last time 70 // comparing numbers of reports, the comparison should be from the last time
71 // GetReportsCount() was called (not from the beginning of the test). 71 // GetReportsCount() was called (not from the beginning of the test).
72 int GetReportsCount(); 72 int GetReportsCount();
73 73
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 // Sets this to true to mock incognito state. 129 // Sets this to true to mock incognito state.
130 bool is_incognito_; 130 bool is_incognito_;
131 131
132 DISALLOW_COPY_AND_ASSIGN(TestRapporService); 132 DISALLOW_COPY_AND_ASSIGN(TestRapporService);
133 }; 133 };
134 134
135 } // namespace rappor 135 } // namespace rappor
136 136
137 #endif // COMPONENTS_RAPPOR_TEST_RAPPOR_SERVICE_H_ 137 #endif // COMPONENTS_RAPPOR_TEST_RAPPOR_SERVICE_H_
OLDNEW
« no previous file with comments | « components/rappor/sampler_unittest.cc ('k') | components/rappor/test_rappor_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698