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

Unified Diff: chrome/browser/signin/signin_names_io_thread.cc

Issue 33753002: Sooper experimental refactoring of the profile info cache. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 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
« no previous file with comments | « chrome/browser/profiles/profiles_state.cc ('k') | chrome/browser/task_manager/task_manager_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/signin_names_io_thread.cc
diff --git a/chrome/browser/signin/signin_names_io_thread.cc b/chrome/browser/signin/signin_names_io_thread.cc
index 2186ce3dcdb77379afd6985324471bf134843118..71a9e4fb70838cd2c9fd2a3ffc3d4f380f989835 100644
--- a/chrome/browser/signin/signin_names_io_thread.cc
+++ b/chrome/browser/signin/signin_names_io_thread.cc
@@ -30,8 +30,10 @@ SigninNamesOnIOThread::SigninNamesOnIOThread() {
ProfileManager* manager = g_browser_process->profile_manager();
if (manager) {
const ProfileInfoCache& cache = manager->GetProfileInfoCache();
- for (size_t i = 0; i < cache.GetNumberOfProfiles(); ++i) {
- string16 email = cache.GetUserNameOfProfileAtIndex(i);
+ const std::vector<ProfileInfoEntry> entries(cache.GetProfilesSortedByName());
+ for (std::vector<ProfileInfoEntry>::const_iterator it = entries.begin();
+ it != entries.end(); ++it) {
+ string16 email = it->user_name();
if (!email.empty())
emails_.insert(email);
}
« no previous file with comments | « chrome/browser/profiles/profiles_state.cc ('k') | chrome/browser/task_manager/task_manager_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698