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

Side by Side Diff: chrome/browser/metrics/chrome_metrics_service_client.cc

Issue 2560863002: Disable HttpsEngagementMetricsProvider (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/metrics/chrome_metrics_service_client.h" 5 #include "chrome/browser/metrics/chrome_metrics_service_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 12 matching lines...) Expand all
23 #include "base/rand_util.h" 23 #include "base/rand_util.h"
24 #include "base/strings/string16.h" 24 #include "base/strings/string16.h"
25 #include "base/threading/platform_thread.h" 25 #include "base/threading/platform_thread.h"
26 #include "base/threading/thread_task_runner_handle.h" 26 #include "base/threading/thread_task_runner_handle.h"
27 #include "build/build_config.h" 27 #include "build/build_config.h"
28 #include "chrome/browser/browser_process.h" 28 #include "chrome/browser/browser_process.h"
29 #include "chrome/browser/chrome_notification_types.h" 29 #include "chrome/browser/chrome_notification_types.h"
30 #include "chrome/browser/google/google_brand.h" 30 #include "chrome/browser/google/google_brand.h"
31 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" 31 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
32 #include "chrome/browser/metrics/chrome_stability_metrics_provider.h" 32 #include "chrome/browser/metrics/chrome_stability_metrics_provider.h"
33 #include "chrome/browser/metrics/https_engagement_metrics_provider.h"
34 #include "chrome/browser/metrics/metrics_reporting_state.h" 33 #include "chrome/browser/metrics/metrics_reporting_state.h"
35 #include "chrome/browser/metrics/sampling_metrics_provider.h" 34 #include "chrome/browser/metrics/sampling_metrics_provider.h"
36 #include "chrome/browser/metrics/subprocess_metrics_provider.h" 35 #include "chrome/browser/metrics/subprocess_metrics_provider.h"
37 #include "chrome/browser/metrics/time_ticks_experiment_win.h" 36 #include "chrome/browser/metrics/time_ticks_experiment_win.h"
38 #include "chrome/browser/sync/chrome_sync_client.h" 37 #include "chrome/browser/sync/chrome_sync_client.h"
39 #include "chrome/browser/ui/browser_otr_state.h" 38 #include "chrome/browser/ui/browser_otr_state.h"
40 #include "chrome/common/channel_info.h" 39 #include "chrome/common/channel_info.h"
41 #include "chrome/common/chrome_paths.h" 40 #include "chrome/common/chrome_paths.h"
42 #include "chrome/common/chrome_paths_internal.h" 41 #include "chrome/common/chrome_paths_internal.h"
43 #include "chrome/common/chrome_switches.h" 42 #include "chrome/common/chrome_switches.h"
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 metrics_service_->RegisterMetricsProvider( 684 metrics_service_->RegisterMetricsProvider(
686 std::unique_ptr<metrics::MetricsProvider>( 685 std::unique_ptr<metrics::MetricsProvider>(
687 SigninStatusMetricsProvider::CreateInstance(base::WrapUnique( 686 SigninStatusMetricsProvider::CreateInstance(base::WrapUnique(
688 new ChromeSigninStatusMetricsProviderDelegate)))); 687 new ChromeSigninStatusMetricsProviderDelegate))));
689 #endif // !defined(OS_CHROMEOS) 688 #endif // !defined(OS_CHROMEOS)
690 689
691 metrics_service_->RegisterMetricsProvider( 690 metrics_service_->RegisterMetricsProvider(
692 std::unique_ptr<metrics::MetricsProvider>( 691 std::unique_ptr<metrics::MetricsProvider>(
693 new syncer::DeviceCountMetricsProvider(base::Bind( 692 new syncer::DeviceCountMetricsProvider(base::Bind(
694 &browser_sync::ChromeSyncClient::GetDeviceInfoTrackers)))); 693 &browser_sync::ChromeSyncClient::GetDeviceInfoTrackers))));
695
696 metrics_service_->RegisterMetricsProvider(
697 std::unique_ptr<metrics::MetricsProvider>(
698 new HttpsEngagementMetricsProvider()));
699 } 694 }
700 695
701 bool ChromeMetricsServiceClient::ShouldIncludeProfilerDataInLog() { 696 bool ChromeMetricsServiceClient::ShouldIncludeProfilerDataInLog() {
702 // Upload profiler data at most once per session. 697 // Upload profiler data at most once per session.
703 if (has_uploaded_profiler_data_) 698 if (has_uploaded_profiler_data_)
704 return false; 699 return false;
705 700
706 // For each log, flip a fair coin. Thus, profiler data is sent with the first 701 // For each log, flip a fair coin. Thus, profiler data is sent with the first
707 // log with probability 50%, with the second log with probability 25%, and so 702 // log with probability 50%, with the second log with probability 25%, and so
708 // on. As a result, uploaded data is biased toward earlier logs. 703 // on. As a result, uploaded data is biased toward earlier logs.
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 } 884 }
890 } 885 }
891 886
892 void ChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { 887 void ChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) {
893 metrics_service_->OnApplicationNotIdle(); 888 metrics_service_->OnApplicationNotIdle();
894 } 889 }
895 890
896 bool ChromeMetricsServiceClient::IsUMACellularUploadLogicEnabled() { 891 bool ChromeMetricsServiceClient::IsUMACellularUploadLogicEnabled() {
897 return metrics::IsCellularLogicEnabled(); 892 return metrics::IsCellularLogicEnabled();
898 } 893 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698