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

Side by Side Diff: chrome/browser/profiles/profile_manager.cc

Issue 605333002: Record the number of loaded profiles when a profile is erased from the profiles map kept by profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/profile_manager.h" 5 #include "chrome/browser/profiles/profile_manager.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 RunCallbacks(callbacks, profile, Profile::CREATE_STATUS_CREATED); 950 RunCallbacks(callbacks, profile, Profile::CREATE_STATUS_CREATED);
951 951
952 // Perform initialization. 952 // Perform initialization.
953 if (success) { 953 if (success) {
954 DoFinalInit(profile, go_off_the_record); 954 DoFinalInit(profile, go_off_the_record);
955 if (go_off_the_record) 955 if (go_off_the_record)
956 profile = profile->GetOffTheRecordProfile(); 956 profile = profile->GetOffTheRecordProfile();
957 info->created = true; 957 info->created = true;
958 } else { 958 } else {
959 profile = NULL; 959 profile = NULL;
960 profiles_info_.erase(iter); 960 profiles_info_.erase(iter);
Alexei Svitkine (slow) 2014/09/26 20:30:26 If the plan is for this to be temporary, add a TOD
yao 2014/09/26 20:35:40 Done.
961 UMA_HISTOGRAM_COUNTS("UMA.ProfilesCount", profiles_info_.size());
Alexei Svitkine (slow) 2014/09/26 20:30:26 Let's do UMA_HISTOGRAM_COUNTS_100().
yao 2014/09/26 20:35:40 Done.
961 } 962 }
962 963
963 if (profile) { 964 if (profile) {
964 // If this was the guest profile, finish setting its special status. 965 // If this was the guest profile, finish setting its special status.
965 if (profile->GetPath() == ProfileManager::GetGuestProfilePath()) 966 if (profile->GetPath() == ProfileManager::GetGuestProfilePath())
966 SetGuestProfilePrefs(profile); 967 SetGuestProfilePrefs(profile);
967 968
968 // Invoke CREATED callback for incognito profiles. 969 // Invoke CREATED callback for incognito profiles.
969 if (go_off_the_record) 970 if (go_off_the_record)
970 RunCallbacks(callbacks, profile, Profile::CREATE_STATUS_CREATED); 971 RunCallbacks(callbacks, profile, Profile::CREATE_STATUS_CREATED);
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); 1322 last_non_supervised_profile_path.BaseName().MaybeAsASCII());
1322 FinishDeletingProfile(profile_to_delete_path); 1323 FinishDeletingProfile(profile_to_delete_path);
1323 } 1324 }
1324 } 1325 }
1325 } 1326 }
1326 #endif 1327 #endif
1327 1328
1328 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1329 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1329 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1330 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1330 } 1331 }
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698