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

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

Issue 8890054: Adding metrics to track browser launches per primary/secondary profile. Adding metrics to track n... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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_metrics.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698