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

Unified Diff: chrome/browser/profiles/profiles_state.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
Index: chrome/browser/profiles/profiles_state.cc
diff --git a/chrome/browser/profiles/profiles_state.cc b/chrome/browser/profiles/profiles_state.cc
index 316527136fc45b5437196ce901e6b8507bd94d96..31bc726c8f92ca8436a8a308456db198047f173e 100644
--- a/chrome/browser/profiles/profiles_state.cc
+++ b/chrome/browser/profiles/profiles_state.cc
@@ -69,9 +69,10 @@ string16 GetActiveProfileDisplayName(Browser* browser) {
} else {
ProfileInfoCache& cache =
g_browser_process->profile_manager()->GetProfileInfoCache();
- size_t index = cache.GetIndexOfProfileWithPath(profile->GetPath());
- if (index != std::string::npos)
- profile_name = cache.GetNameOfProfileAtIndex(index);
+
+ ProfileInfoEntry entry;
+ if (cache.GetInfoForProfile(profile->GetPath(), &entry))
+ profile_name = entry.GetDisplayName();
}
return profile_name;
}
« no previous file with comments | « chrome/browser/profiles/profile_shortcut_manager_win.cc ('k') | chrome/browser/signin/signin_names_io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698