| Index: components/rappor/rappor_utils.cc
|
| diff --git a/components/rappor/rappor_utils.cc b/components/rappor/rappor_utils.cc
|
| index 89e4576b7ba30837fe5ba8e2d3e947fbfb5efd02..da493dec8cd68d80422feb72eb0ca55a21c4c979 100644
|
| --- a/components/rappor/rappor_utils.cc
|
| +++ b/components/rappor/rappor_utils.cc
|
| @@ -2,22 +2,21 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "components/rappor/rappor_utils.h"
|
| +#include "components/rappor/public/rappor_utils.h"
|
|
|
| -#include "components/rappor/rappor_service.h"
|
| #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
|
| #include "net/base/url_util.h"
|
| #include "url/gurl.h"
|
|
|
| namespace rappor {
|
|
|
| -void SampleString(RapporService* rappor_service,
|
| +void SampleString(RapporPublicService* rappor_service,
|
| const std::string& metric,
|
| RapporType type,
|
| const std::string& sample) {
|
| if (!rappor_service)
|
| return;
|
| - rappor_service->RecordSample(metric, type, sample);
|
| + rappor_service->RecordSampleString(metric, type, sample);
|
| }
|
|
|
| std::string GetDomainAndRegistrySampleFromGURL(const GURL& gurl) {
|
| @@ -34,15 +33,13 @@ std::string GetDomainAndRegistrySampleFromGURL(const GURL& gurl) {
|
| return gurl.scheme() + "://" + gurl.host();
|
| }
|
|
|
| -void SampleDomainAndRegistryFromGURL(RapporService* rappor_service,
|
| +void SampleDomainAndRegistryFromGURL(RapporPublicService* rappor_service,
|
| const std::string& metric,
|
| const GURL& gurl) {
|
| if (!rappor_service)
|
| return;
|
| - rappor_service->RecordSample(
|
| - metric,
|
| - rappor::ETLD_PLUS_ONE_RAPPOR_TYPE,
|
| - GetDomainAndRegistrySampleFromGURL(gurl));
|
| + rappor_service->RecordSampleString(metric, rappor::ETLD_PLUS_ONE_RAPPOR_TYPE,
|
| + GetDomainAndRegistrySampleFromGURL(gurl));
|
| }
|
|
|
| } // namespace rappor
|
|
|