OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #include "components/rappor/rappor_utils.h" | |
6 | |
7 #include "components/rappor/rappor_service.h" | |
8 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | |
9 | |
10 namespace rappor { | |
11 | |
12 void SampleETLDp1(RapporService* service, | |
13 const std::string& metric, | |
14 const GURL& gurl) { | |
15 if (!service) return; | |
Alexei Svitkine (slow)
2014/06/05 14:23:35
Nit: Put return on next line.
Steven Holte
2014/06/05 20:17:07
Done.
| |
16 service->RecordSample(metric, | |
17 rappor::ETLD_PLUS_ONE_RAPPOR_TYPE, | |
18 net::registry_controlled_domains::GetDomainAndRegistry(gurl, | |
19 net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES)); | |
20 } | |
21 | |
22 void SampleETLDp1(RapporService* service, | |
23 const std::string& metric, | |
24 const std::string& host) { | |
25 if (!service) return; | |
26 service->RecordSample(metric, | |
27 rappor::ETLD_PLUS_ONE_RAPPOR_TYPE, | |
28 net::registry_controlled_domains::GetDomainAndRegistry(host, | |
29 net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES)); | |
30 } | |
31 | |
32 } // namespace rappor | |
OLD | NEW |