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

Unified Diff: chrome/browser/profiles/gaia_info_update_service.cc

Issue 1746993002: Stop chrome from logging profile counts too many times at startup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/gaia_info_update_service.cc
diff --git a/chrome/browser/profiles/gaia_info_update_service.cc b/chrome/browser/profiles/gaia_info_update_service.cc
index eaf6c138707c0b05f95b6ed68401186b1f038201..5c55f51c25802a452628d85a23993e7b72681192 100644
--- a/chrome/browser/profiles/gaia_info_update_service.cc
+++ b/chrome/browser/profiles/gaia_info_update_service.cc
@@ -53,9 +53,6 @@ GAIAInfoUpdateService::~GAIAInfoUpdateService() {
}
void GAIAInfoUpdateService::Update() {
- // UMA Profile Metrics should be logged regularly.
- ProfileMetrics::LogNumberOfProfiles(g_browser_process->profile_manager());
-
// The user must be logged in.
SigninManagerBase* signin_manager =
SigninManagerFactory::GetForProfile(profile_);
@@ -204,6 +201,14 @@ void GAIAInfoUpdateService::ScheduleNextUpdate() {
else
delta = desired_delta - update_delta;
+ // UMA Profile Metrics should be logged regularly. Logging is not performed
+ // in Update() because it is a public method and may be called at any time.
+ // These metrics should logged only on this schedule.
+ //
+ // In mac perf tests, the browser process pointer may be null.
+ if (g_browser_process)
+ ProfileMetrics::LogNumberOfProfiles(g_browser_process->profile_manager());
+
timer_.Start(FROM_HERE, delta, this, &GAIAInfoUpdateService::Update);
}
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698