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

Unified Diff: components/rappor/test_rappor_service.cc

Issue 2510803003: Pass RapporService to content/browser/ (Closed)
Patch Set: Fix an Android compile error Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: components/rappor/test_rappor_service.cc
diff --git a/components/rappor/test_rappor_service.cc b/components/rappor/test_rappor_service.cc
index edd51c3f2d9a3435f4372162ec148ca0533de64e..6a25d828ebd750ba80843b3d23d45b1af6d3eb2b 100644
--- a/components/rappor/test_rappor_service.cc
+++ b/components/rappor/test_rappor_service.cc
@@ -10,7 +10,7 @@
#include "base/memory/ptr_util.h"
#include "components/rappor/byte_vector_utils.h"
#include "components/rappor/proto/rappor_metric.pb.h"
-#include "components/rappor/rappor_parameters.h"
+#include "components/rappor/public/rappor_parameters.h"
#include "components/rappor/rappor_prefs.h"
#include "components/rappor/test_log_uploader.h"
@@ -71,27 +71,27 @@ std::unique_ptr<Sample> TestRapporService::CreateSample(RapporType type) {
}
// Intercepts the sample being recorded and saves it in a test structure.
-void TestRapporService::RecordSampleObj(const std::string& metric_name,
- std::unique_ptr<Sample> sample) {
+void TestRapporService::RecordSample(const std::string& metric_name,
+ std::unique_ptr<Sample> sample) {
TestSample* test_sample = static_cast<TestSample*>(sample.get());
// Erase the previous sample if we logged one.
shadows_.erase(metric_name);
shadows_.insert(std::pair<std::string, TestSample::Shadow>(
metric_name, test_sample->GetShadow()));
// Original version is still called.
- RapporService::RecordSampleObj(metric_name, std::move(sample));
+ RapporService::RecordSample(metric_name, std::move(sample));
}
-void TestRapporService::RecordSample(const std::string& metric_name,
- RapporType type,
- const std::string& sample) {
+void TestRapporService::RecordSampleString(const std::string& metric_name,
+ RapporType type,
+ const std::string& sample) {
// Save the recorded sample to the local structure.
RapporSample rappor_sample;
rappor_sample.type = type;
rappor_sample.value = sample;
samples_[metric_name] = rappor_sample;
// Original version is still called.
- RapporService::RecordSample(metric_name, type, sample);
+ RapporService::RecordSampleString(metric_name, type, sample);
}
int TestRapporService::GetReportsCount() {

Powered by Google App Engine
This is Rietveld 408576698