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

Side by Side Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc

Issue 7711002: This changes ProfileManager::GetProfileInfoCache() to be GetProfileInfo() and (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/views/frame/opaque_browser_frame_view.h" 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 RemoveChildView(avatar_button_.release()); 1158 RemoveChildView(avatar_button_.release());
1159 frame_->GetRootView()->Layout(); 1159 frame_->GetRootView()->Layout();
1160 } 1160 }
1161 1161
1162 if (!avatar_button_.get()) 1162 if (!avatar_button_.get())
1163 return; 1163 return;
1164 1164
1165 if (browser_view_->IsOffTheRecord()) { 1165 if (browser_view_->IsOffTheRecord()) {
1166 avatar_button_->SetIcon(browser_view_->GetOTRAvatarIcon()); 1166 avatar_button_->SetIcon(browser_view_->GetOTRAvatarIcon());
1167 } else { 1167 } else {
1168 ProfileInfoCache& cache = 1168 ProfileInfoInterface& cache =
1169 g_browser_process->profile_manager()->GetProfileInfoCache(); 1169 g_browser_process->profile_manager()->GetProfileInfo();
1170 Profile* profile = browser_view_->browser()->profile(); 1170 Profile* profile = browser_view_->browser()->profile();
1171 size_t index = cache.GetIndexOfProfileWithPath(profile->GetPath()); 1171 size_t index = cache.GetIndexOfProfileWithPath(profile->GetPath());
1172 if (index != std::string::npos) { 1172 if (index != std::string::npos) {
1173 avatar_button_->SetIcon(cache.GetAvatarIconOfProfileAtIndex(index)); 1173 avatar_button_->SetIcon(cache.GetAvatarIconOfProfileAtIndex(index));
1174 avatar_button_->SetText(UTF16ToWideHack( 1174 avatar_button_->SetText(UTF16ToWideHack(
1175 cache.GetNameOfProfileAtIndex(index))); 1175 cache.GetNameOfProfileAtIndex(index)));
1176 } 1176 }
1177 } 1177 }
1178 } 1178 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/glass_browser_frame_view.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_sync_setup_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698