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 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
932 } | 932 } |
933 } | 933 } |
934 | 934 |
935 void ChromeMetricsServiceClient::RegisterForProfileEvents(Profile* profile) { | 935 void ChromeMetricsServiceClient::RegisterForProfileEvents(Profile* profile) { |
936 // Register chrome://ukm handler | 936 // Register chrome://ukm handler |
937 content::URLDataSource::Add( | 937 content::URLDataSource::Add( |
938 profile, new ukm::debug::DebugPage(base::Bind( | 938 profile, new ukm::debug::DebugPage(base::Bind( |
939 &BindableGetUkmService, weak_ptr_factory_.GetWeakPtr()))); | 939 &BindableGetUkmService, weak_ptr_factory_.GetWeakPtr()))); |
940 #if defined(OS_CHROMEOS) | 940 #if defined(OS_CHROMEOS) |
941 // Ignore the signin profile for sync disables / history deletion. | 941 // Ignore the signin profile for sync disables / history deletion. |
942 if (chromeos::ProfileHelper::IsSigninProfile(profile)) | 942 if (chromeos::ProfileHelper::IsSigninProfile(profile) || |
| 943 chromeos::ProfileHelper::IsLockScreenAppProfile(profile)) { |
943 return; | 944 return; |
| 945 } |
944 #endif | 946 #endif |
945 history::HistoryService* history_service = | 947 history::HistoryService* history_service = |
946 HistoryServiceFactory::GetForProfile(profile, | 948 HistoryServiceFactory::GetForProfile(profile, |
947 ServiceAccessType::IMPLICIT_ACCESS); | 949 ServiceAccessType::IMPLICIT_ACCESS); |
948 ObserveServiceForDeletions(history_service); | 950 ObserveServiceForDeletions(history_service); |
949 browser_sync::ProfileSyncService* sync = | 951 browser_sync::ProfileSyncService* sync = |
950 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile); | 952 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile); |
951 if (sync) | 953 if (sync) |
952 ObserveServiceForSyncDisables(static_cast<syncer::SyncService*>(sync)); | 954 ObserveServiceForSyncDisables(static_cast<syncer::SyncService*>(sync)); |
953 } | 955 } |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 ukm_service_->Purge(); | 1009 ukm_service_->Purge(); |
1008 ukm_service_->ResetClientId(); | 1010 ukm_service_->ResetClientId(); |
1009 } | 1011 } |
1010 // Signal service manager to enable/disable UKM based on new state. | 1012 // Signal service manager to enable/disable UKM based on new state. |
1011 UpdateRunningServices(); | 1013 UpdateRunningServices(); |
1012 } | 1014 } |
1013 | 1015 |
1014 bool ChromeMetricsServiceClient::IsHistorySyncEnabledOnAllProfiles() { | 1016 bool ChromeMetricsServiceClient::IsHistorySyncEnabledOnAllProfiles() { |
1015 return SyncDisableObserver::IsHistorySyncEnabledOnAllProfiles(); | 1017 return SyncDisableObserver::IsHistorySyncEnabledOnAllProfiles(); |
1016 } | 1018 } |
OLD | NEW |