OLD | NEW |
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 <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 base::FilePath user_data_dir; | 688 base::FilePath user_data_dir; |
689 base::FilePath crash_dir; | 689 base::FilePath crash_dir; |
690 if (!base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir) || | 690 if (!base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir) || |
691 !base::PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dir)) { | 691 !base::PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dir)) { |
692 // If either call fails, then clear both. | 692 // If either call fails, then clear both. |
693 user_data_dir = base::FilePath(); | 693 user_data_dir = base::FilePath(); |
694 crash_dir = base::FilePath(); | 694 crash_dir = base::FilePath(); |
695 } | 695 } |
696 watcher_metrics_provider_ = new browser_watcher::WatcherMetricsProviderWin( | 696 watcher_metrics_provider_ = new browser_watcher::WatcherMetricsProviderWin( |
697 chrome::GetBrowserExitCodesRegistryPath(), user_data_dir, crash_dir, | 697 chrome::GetBrowserExitCodesRegistryPath(), user_data_dir, crash_dir, |
698 base::Bind(&GetExecutableVersionDetails), | 698 base::Bind(&GetExecutableVersionDetails)); |
699 content::BrowserThread::GetBlockingPool()); | |
700 metrics_service_->RegisterMetricsProvider( | 699 metrics_service_->RegisterMetricsProvider( |
701 std::unique_ptr<metrics::MetricsProvider>(watcher_metrics_provider_)); | 700 std::unique_ptr<metrics::MetricsProvider>(watcher_metrics_provider_)); |
702 | 701 |
703 antivirus_metrics_provider_ = new AntiVirusMetricsProvider(); | 702 antivirus_metrics_provider_ = new AntiVirusMetricsProvider(); |
704 | 703 |
705 metrics_service_->RegisterMetricsProvider( | 704 metrics_service_->RegisterMetricsProvider( |
706 std::unique_ptr<metrics::MetricsProvider>(antivirus_metrics_provider_)); | 705 std::unique_ptr<metrics::MetricsProvider>(antivirus_metrics_provider_)); |
707 #endif // defined(OS_WIN) | 706 #endif // defined(OS_WIN) |
708 | 707 |
709 #if BUILDFLAG(ENABLE_PLUGINS) | 708 #if BUILDFLAG(ENABLE_PLUGINS) |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1013 ukm_service_->Purge(); | 1012 ukm_service_->Purge(); |
1014 ukm_service_->ResetClientId(); | 1013 ukm_service_->ResetClientId(); |
1015 } | 1014 } |
1016 // Signal service manager to enable/disable UKM based on new state. | 1015 // Signal service manager to enable/disable UKM based on new state. |
1017 UpdateRunningServices(); | 1016 UpdateRunningServices(); |
1018 } | 1017 } |
1019 | 1018 |
1020 bool ChromeMetricsServiceClient::IsHistorySyncEnabledOnAllProfiles() { | 1019 bool ChromeMetricsServiceClient::IsHistorySyncEnabledOnAllProfiles() { |
1021 return SyncDisableObserver::IsHistorySyncEnabledOnAllProfiles(); | 1020 return SyncDisableObserver::IsHistorySyncEnabledOnAllProfiles(); |
1022 } | 1021 } |
OLD | NEW |