| 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);
|
| }
|
|
|