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

Unified Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view.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/ui/views/avatar_menu_bubble_view.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
index b1a0b3d25592847c9b059508fd40fc6053efa8b0..a2b06af7ab96bec7bcbe22e7e440570dbe2eefbb 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
@@ -95,10 +95,12 @@ void BrowserNonClientFrameView::UpdateAvatarInfo() {
ProfileInfoCache& cache =
g_browser_process->profile_manager()->GetProfileInfoCache();
Profile* profile = browser_view_->browser()->profile();
- size_t index = cache.GetIndexOfProfileWithPath(profile->GetPath());
- if (index == std::string::npos)
+
+ ProfileInfoEntry entry;
+ if (!cache.GetInfoForProfile(profile->GetPath(), &entry))
return;
- text = cache.GetNameOfProfileAtIndex(index);
+
+ text = entry.GetDisplayName();
AvatarMenu::GetImageForMenuButton(browser_view_->browser()->profile(),
&avatar,
« no previous file with comments | « chrome/browser/ui/views/avatar_menu_bubble_view.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698