Index: chrome/browser/profiles/profile_manager.cc |
=================================================================== |
--- chrome/browser/profiles/profile_manager.cc (revision 113419) |
+++ chrome/browser/profiles/profile_manager.cc (working copy) |
@@ -21,6 +21,7 @@ |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/prefs/scoped_user_pref_update.h" |
#include "chrome/browser/profiles/profile_info_cache.h" |
+#include "chrome/browser/profiles/profile_metrics.h" |
#include "chrome/browser/sessions/session_service_factory.h" |
#include "chrome/browser/sync/profile_sync_service.h" |
#include "chrome/browser/ui/browser.h" |
@@ -386,6 +387,7 @@ |
RegisterProfile(profile, true); |
DoFinalInit(profile, ShouldGoOffTheRecord()); |
+ ProfileMetrics::LogNumberOfProfiles(this, ProfileMetrics::ADD_PROFILE_EVENT); |
return true; |
} |
@@ -418,6 +420,8 @@ |
browser_init.LaunchBrowser(command_line, profile, FilePath(), |
process_startup, is_first_run, &return_code); |
} |
+ FilePath profile_path = profile->GetPath(); |
+ ProfileMetrics::LogProfileLaunch(profile_path); |
sky
2011/12/09 23:29:43
I believe NewWindowWithProfile is not invoked for
|
} |
void ProfileManager::Observe( |
@@ -686,6 +690,9 @@ |
QueueProfileDirectoryForDeletion(profile_dir); |
cache.DeleteProfileFromCache(profile_dir); |
+ |
+ ProfileMetrics::LogNumberOfProfiles(this, |
+ ProfileMetrics::DELETE_PROFILE_EVENT); |
} |
// static |
@@ -708,6 +715,8 @@ |
GetProfile(cache.GetPathOfProfileAtIndex(p)); |
} |
} |
+ ProfileMetrics::LogNumberOfProfiles(this, |
+ ProfileMetrics::STARTUP_PROFILE_EVENT); |
} |
ProfileManagerWithoutInit::ProfileManagerWithoutInit( |