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

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

Issue 593243002: Profile_Metrics integration with Keystone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove separate attribute header; refactor setActive methods. Created 6 years, 2 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
Index: chrome/browser/profiles/profile_metrics.cc
diff --git a/chrome/browser/profiles/profile_metrics.cc b/chrome/browser/profiles/profile_metrics.cc
index 0804fd88b8de1a4f9306faa0cec4e890e09404e1..45d2c08d1268b25e629b970eea833baa839c7f0d 100644
--- a/chrome/browser/profiles/profile_metrics.cc
+++ b/chrome/browser/profiles/profile_metrics.cc
@@ -38,12 +38,6 @@ ProfileMetrics::ProfileType GetProfileType(
return metric;
}
-void UpdateReportedOSProfileStatistics(int active, int signedin) {
-#if defined(OS_WIN)
- GoogleUpdateSettings::UpdateProfileCounts(active, signedin);
-#endif
-}
-
void LogLockedProfileInformation(ProfileManager* manager) {
const ProfileInfoCache& info_cache = manager->GetProfileInfoCache();
size_t number_of_profiles = info_cache.GetNumberOfProfiles();
@@ -157,10 +151,20 @@ void ProfileMetrics::UpdateReportedProfilesStatistics(ProfileManager* manager) {
(int)((float)(counts.signedin * limited_total)
/ counts.total + 0.5);
}
+#if defined(OS_WIN) || defined(OS_MACOSX)
UpdateReportedOSProfileStatistics(limited_total, limited_signedin);
+#endif
}
}
+// The MACOSX implementation of this function is in profile_metrics_mac.mm.
+#if defined(OS_WIN)
+void ProfileMetrics::UpdateReportedOSProfileStatistics(
+ int active, int signedin) {
+ GoogleUpdateSettings::UpdateProfileCounts(active, signedin);
+}
+#endif
+
void ProfileMetrics::LogNumberOfProfiles(ProfileManager* manager) {
ProfileCounts counts;
bool success = CountProfileInformation(manager, &counts);
@@ -180,7 +184,10 @@ void ProfileMetrics::LogNumberOfProfiles(ProfileManager* manager) {
counts.gaia_icon);
LogLockedProfileInformation(manager);
+
+#if defined(OS_WIN) || defined(OS_MACOSX)
UpdateReportedOSProfileStatistics(counts.total, counts.signedin);
+#endif
}
}

Powered by Google App Engine
This is Rietveld 408576698