| Index: chrome/browser/profiles/profile_manager.cc
|
| diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
|
| index 781158517596b62bc8ad0247e744f9e1f8c67142..ba15476a3edcae6fd85a966dea9a0c2b8fd885b7 100644
|
| --- a/chrome/browser/profiles/profile_manager.cc
|
| +++ b/chrome/browser/profiles/profile_manager.cc
|
| @@ -374,15 +374,19 @@ Profile* ProfileManager::GetActiveUserProfile() {
|
|
|
| Profile* ProfileManager::GetProfile(const base::FilePath& profile_dir) {
|
| TRACE_EVENT0("browser", "ProfileManager::GetProfile");
|
| - SCOPED_UMA_HISTOGRAM_TIMER("Profile.GetProfile");
|
|
|
| // If the profile is already loaded (e.g., chrome.exe launched twice), just
|
| // return it.
|
| Profile* profile = GetProfileByPath(profile_dir);
|
| if (NULL != profile)
|
| return profile;
|
| + return SetupProfile(profile_dir);
|
| +}
|
|
|
| - profile = CreateProfileHelper(profile_dir);
|
| +Profile* ProfileManager::SetupProfile(const base::FilePath& profile_dir) {
|
| + TRACE_EVENT0("browser", "ProfileManager::SetupProfile");
|
| + SCOPED_UMA_HISTOGRAM_LONG_TIMER("Profile.SetupProfile");
|
| + Profile* profile = CreateProfileHelper(profile_dir);
|
| DCHECK(profile);
|
| if (profile) {
|
| bool result = AddProfile(profile);
|
| @@ -402,10 +406,10 @@ void ProfileManager::CreateProfileAsync(
|
| const base::string16& icon_url,
|
| const std::string& supervised_user_id) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| - TRACE_EVENT1("startup",
|
| + TRACE_EVENT1("browser,startup",
|
| "ProfileManager::CreateProfileAsync",
|
| "profile_path",
|
| - profile_path.value().c_str());
|
| + profile_path.MaybeAsASCII());
|
|
|
| // Make sure that this profile is not pending deletion.
|
| if (IsProfileMarkedForDeletion(profile_path)) {
|
| @@ -1076,6 +1080,8 @@ void ProfileManager::DoFinalInitLogging(Profile* profile) {
|
|
|
| Profile* ProfileManager::CreateProfileHelper(const base::FilePath& path) {
|
| TRACE_EVENT0("browser", "ProfileManager::CreateProfileHelper");
|
| + SCOPED_UMA_HISTOGRAM_TIMER("Profile.CreateProfileHelperTime");
|
| +
|
| return Profile::CreateProfile(path, NULL, Profile::CREATE_MODE_SYNCHRONOUS);
|
| }
|
|
|
|
|