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

Side by Side Diff: components/metrics/metrics_service_client.cc

Issue 2922493002: Default to new metrics service URL for non-Cast clients. (Closed)
Patch Set: Created 3 years, 6 months 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/metrics/metrics_service_client.h" 5 #include "components/metrics/metrics_service_client.h"
6 6
7 #include "base/feature_list.h"
8 #include "components/metrics/url_constants.h" 7 #include "components/metrics/url_constants.h"
9 8
10 namespace metrics { 9 namespace metrics {
11 10
12 namespace {
13
14 #if defined(OS_ANDROID) || defined(OS_IOS)
15 const base::Feature kNewMetricsUrlFeature{"NewMetricsUrl",
16 base::FEATURE_ENABLED_BY_DEFAULT};
17 #else
18 const base::Feature kNewMetricsUrlFeature{"NewMetricsUrl",
19 base::FEATURE_DISABLED_BY_DEFAULT};
20 #endif
21
22 } // namespace
23
24 MetricsServiceClient::MetricsServiceClient() : update_running_services_() {} 11 MetricsServiceClient::MetricsServiceClient() : update_running_services_() {}
25 12
26 MetricsServiceClient::~MetricsServiceClient() {} 13 MetricsServiceClient::~MetricsServiceClient() {}
27 14
28 ukm::UkmService* MetricsServiceClient::GetUkmService() { 15 ukm::UkmService* MetricsServiceClient::GetUkmService() {
29 return nullptr; 16 return nullptr;
30 } 17 }
31 18
32 base::string16 MetricsServiceClient::GetRegistryBackupKey() { 19 base::string16 MetricsServiceClient::GetRegistryBackupKey() {
33 return base::string16(); 20 return base::string16();
34 } 21 }
35 22
36 bool MetricsServiceClient::IsReportingPolicyManaged() { 23 bool MetricsServiceClient::IsReportingPolicyManaged() {
37 return false; 24 return false;
38 } 25 }
39 26
40 EnableMetricsDefault MetricsServiceClient::GetMetricsReportingDefaultState() { 27 EnableMetricsDefault MetricsServiceClient::GetMetricsReportingDefaultState() {
41 return EnableMetricsDefault::DEFAULT_UNKNOWN; 28 return EnableMetricsDefault::DEFAULT_UNKNOWN;
42 } 29 }
43 30
44 bool MetricsServiceClient::IsUMACellularUploadLogicEnabled() { 31 bool MetricsServiceClient::IsUMACellularUploadLogicEnabled() {
45 return false; 32 return false;
46 } 33 }
47 34
48 std::string MetricsServiceClient::GetMetricsServerUrl() { 35 std::string MetricsServiceClient::GetMetricsServerUrl() {
49 return base::FeatureList::IsEnabled(kNewMetricsUrlFeature) 36 return kNewMetricsServerUrl;
50 ? kNewMetricsServerUrl
51 : kOldMetricsServerUrl;
52 } 37 }
53 38
54 bool MetricsServiceClient::IsHistorySyncEnabledOnAllProfiles() { 39 bool MetricsServiceClient::IsHistorySyncEnabledOnAllProfiles() {
55 return false; 40 return false;
56 } 41 }
57 42
58 void MetricsServiceClient::SetUpdateRunningServicesCallback( 43 void MetricsServiceClient::SetUpdateRunningServicesCallback(
59 const base::Closure& callback) { 44 const base::Closure& callback) {
60 update_running_services_ = callback; 45 update_running_services_ = callback;
61 } 46 }
62 47
63 void MetricsServiceClient::UpdateRunningServices() { 48 void MetricsServiceClient::UpdateRunningServices() {
64 if (update_running_services_) 49 if (update_running_services_)
65 update_running_services_.Run(); 50 update_running_services_.Run();
66 } 51 }
67 52
68 } // namespace metrics 53 } // namespace metrics
OLDNEW
« no previous file with comments | « chromecast/browser/metrics/cast_metrics_service_client.cc ('k') | testing/variations/fieldtrial_testing_config.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698