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

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

Issue 2510803003: Pass RapporService to content/browser/ (Closed)
Patch Set: Fix more compile errors in JNI files 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 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_metric.h" 5 #include "components/rappor/rappor_metric.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/rand_util.h" 8 #include "base/rand_util.h"
9 #include "components/rappor/rappor_parameters.h" 9 #include "components/rappor/public/rappor_parameters.h"
10 #include "components/rappor/reports.h" 10 #include "components/rappor/reports.h"
11 11
12 namespace rappor { 12 namespace rappor {
13 13
14 RapporMetric::RapporMetric(const std::string& metric_name, 14 RapporMetric::RapporMetric(const std::string& metric_name,
15 const RapporParameters& parameters, 15 const RapporParameters& parameters,
16 int32_t cohort_seed) 16 int32_t cohort_seed)
17 : metric_name_(metric_name), 17 : metric_name_(metric_name),
18 parameters_(parameters), 18 parameters_(parameters),
19 sample_count_(0), 19 sample_count_(0),
(...skipping 20 matching lines...) Expand all
40 } 40 }
41 41
42 ByteVector RapporMetric::GetReport(const std::string& secret) const { 42 ByteVector RapporMetric::GetReport(const std::string& secret) const {
43 return internal::GenerateReport( 43 return internal::GenerateReport(
44 secret, 44 secret,
45 internal::kNoiseParametersForLevel[parameters().noise_level], 45 internal::kNoiseParametersForLevel[parameters().noise_level],
46 bytes()); 46 bytes());
47 } 47 }
48 48
49 } // namespace rappor 49 } // namespace rappor
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698