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

Side by Side Diff: components/rappor/rappor_service.cc

Issue 1471073007: Reorganize histograms for persistence. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shmem-alloc
Patch Set: added GN changes Created 5 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 unified diff | Download patch
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 #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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698