| OLD | NEW |
| 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 #include "components/rappor/rappor_service.h" | 5 #include "components/rappor/rappor_service.h" |
| 6 | 6 |
| 7 #include "base/metrics/field_trial.h" | 7 #include "base/metrics/field_trial.h" |
| 8 #include "base/metrics/metrics_hashes.h" |
| 8 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 9 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 10 #include "components/metrics/metrics_hashes.h" | |
| 11 #include "components/rappor/log_uploader.h" | 11 #include "components/rappor/log_uploader.h" |
| 12 #include "components/rappor/proto/rappor_metric.pb.h" | 12 #include "components/rappor/proto/rappor_metric.pb.h" |
| 13 #include "components/rappor/rappor_metric.h" | 13 #include "components/rappor/rappor_metric.h" |
| 14 #include "components/rappor/rappor_pref_names.h" | 14 #include "components/rappor/rappor_pref_names.h" |
| 15 #include "components/rappor/rappor_prefs.h" | 15 #include "components/rappor/rappor_prefs.h" |
| 16 #include "components/variations/variations_associated_data.h" | 16 #include "components/variations/variations_associated_data.h" |
| 17 | 17 |
| 18 namespace rappor { | 18 namespace rappor { |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 void RapporService::RecordSampleObj(const std::string& metric_name, | 257 void RapporService::RecordSampleObj(const std::string& metric_name, |
| 258 scoped_ptr<Sample> sample) { | 258 scoped_ptr<Sample> sample) { |
| 259 DCHECK(thread_checker_.CalledOnValidThread()); | 259 DCHECK(thread_checker_.CalledOnValidThread()); |
| 260 if (!RecordingAllowed(sample->parameters())) | 260 if (!RecordingAllowed(sample->parameters())) |
| 261 return; | 261 return; |
| 262 DVLOG(1) << "Recording sample of metric \"" << metric_name << "\""; | 262 DVLOG(1) << "Recording sample of metric \"" << metric_name << "\""; |
| 263 sampler_.AddSample(metric_name, sample.Pass()); | 263 sampler_.AddSample(metric_name, sample.Pass()); |
| 264 } | 264 } |
| 265 | 265 |
| 266 } // namespace rappor | 266 } // namespace rappor |
| OLD | NEW |