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

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

Issue 2945023002: Introduce profile for lock screen apps (Closed)
Patch Set: rebase Created 3 years, 5 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 "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 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 RegisterForProfileEvents(profile); 929 RegisterForProfileEvents(profile);
930 } 930 }
931 } 931 }
932 932
933 void ChromeMetricsServiceClient::RegisterForProfileEvents(Profile* profile) { 933 void ChromeMetricsServiceClient::RegisterForProfileEvents(Profile* profile) {
934 // Register chrome://ukm handler 934 // Register chrome://ukm handler
935 content::URLDataSource::Add( 935 content::URLDataSource::Add(
936 profile, new ukm::debug::DebugPage(base::Bind( 936 profile, new ukm::debug::DebugPage(base::Bind(
937 &BindableGetUkmService, weak_ptr_factory_.GetWeakPtr()))); 937 &BindableGetUkmService, weak_ptr_factory_.GetWeakPtr())));
938 #if defined(OS_CHROMEOS) 938 #if defined(OS_CHROMEOS)
939 // Ignore the signin profile for sync disables / history deletion. 939 // Ignore the signin and lock screen app profile for sync disables / history
940 if (chromeos::ProfileHelper::IsSigninProfile(profile)) 940 // deletion.
941 if (chromeos::ProfileHelper::IsSigninProfile(profile) ||
942 chromeos::ProfileHelper::IsLockScreenAppProfile(profile)) {
941 return; 943 return;
944 }
942 #endif 945 #endif
943 history::HistoryService* history_service = 946 history::HistoryService* history_service =
944 HistoryServiceFactory::GetForProfile(profile, 947 HistoryServiceFactory::GetForProfile(profile,
945 ServiceAccessType::IMPLICIT_ACCESS); 948 ServiceAccessType::IMPLICIT_ACCESS);
946 ObserveServiceForDeletions(history_service); 949 ObserveServiceForDeletions(history_service);
947 browser_sync::ProfileSyncService* sync = 950 browser_sync::ProfileSyncService* sync =
948 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile); 951 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile);
949 if (sync) 952 if (sync)
950 ObserveServiceForSyncDisables(static_cast<syncer::SyncService*>(sync)); 953 ObserveServiceForSyncDisables(static_cast<syncer::SyncService*>(sync));
951 } 954 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 ukm_service_->Purge(); 1008 ukm_service_->Purge();
1006 ukm_service_->ResetClientId(); 1009 ukm_service_->ResetClientId();
1007 } 1010 }
1008 // Signal service manager to enable/disable UKM based on new state. 1011 // Signal service manager to enable/disable UKM based on new state.
1009 UpdateRunningServices(); 1012 UpdateRunningServices();
1010 } 1013 }
1011 1014
1012 bool ChromeMetricsServiceClient::IsHistorySyncEnabledOnAllProfiles() { 1015 bool ChromeMetricsServiceClient::IsHistorySyncEnabledOnAllProfiles() {
1013 return SyncDisableObserver::IsHistorySyncEnabledOnAllProfiles(); 1016 return SyncDisableObserver::IsHistorySyncEnabledOnAllProfiles();
1014 } 1017 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_system_impl.cc ('k') | chrome/browser/policy/profile_policy_connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698