Roll leveldb 3f7758:803d69 (v1.17 -> v1.18)
[chromium-blink-merge.git] / components / rappor / test_rappor_service.cc
blob01dc8d916898fe4b0be41ea89ddb741585a2df1e
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
3 // found in the LICENSE file.
5 #include "components/rappor/test_rappor_service.h"
7 #include "components/rappor/byte_vector_utils.h"
8 #include "components/rappor/proto/rappor_metric.pb.h"
9 #include "components/rappor/rappor_parameters.h"
11 namespace rappor {
13 namespace {
15 bool MockIsIncognito() {
16 return false;
19 } // namespace
21 TestRapporService::TestRapporService()
22 : RapporService(&prefs_, base::Bind(&MockIsIncognito)) {
23 Initialize(0,
24 HmacByteVectorGenerator::GenerateEntropyInput(),
25 FINE_LEVEL);
28 TestRapporService::~TestRapporService() {}
30 int TestRapporService::GetReportsCount() {
31 RapporReports reports;
32 ExportMetrics(&reports);
33 return reports.report_size();
36 } // namespace rappor