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