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

Side by Side Diff: chrome/browser/ui/views/frame/glass_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/glass_browser_frame_view.h" 5 #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/app/chrome_dll_resource.h" 10 #include "chrome/app/chrome_dll_resource.h"
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 RemoveChildView(avatar_button_.release()); 578 RemoveChildView(avatar_button_.release());
579 frame_->GetRootView()->Layout(); 579 frame_->GetRootView()->Layout();
580 } 580 }
581 581
582 if (!avatar_button_.get()) 582 if (!avatar_button_.get())
583 return; 583 return;
584 584
585 if (browser_view_->IsOffTheRecord()) { 585 if (browser_view_->IsOffTheRecord()) {
586 avatar_button_->SetIcon(browser_view_->GetOTRAvatarIcon()); 586 avatar_button_->SetIcon(browser_view_->GetOTRAvatarIcon());
587 } else { 587 } else {
588 ProfileInfoCache& cache = 588 ProfileInfoInterface& cache =
589 g_browser_process->profile_manager()->GetProfileInfoCache(); 589 g_browser_process->profile_manager()->GetProfileInfo();
590 Profile* profile = browser_view_->browser()->profile(); 590 Profile* profile = browser_view_->browser()->profile();
591 size_t index = cache.GetIndexOfProfileWithPath(profile->GetPath()); 591 size_t index = cache.GetIndexOfProfileWithPath(profile->GetPath());
592 if (index != std::string::npos) { 592 if (index != std::string::npos) {
593 avatar_button_->SetIcon(cache.GetAvatarIconOfProfileAtIndex(index)); 593 avatar_button_->SetIcon(cache.GetAvatarIconOfProfileAtIndex(index));
594 avatar_button_->SetText(cache.GetNameOfProfileAtIndex(index)); 594 avatar_button_->SetText(cache.GetNameOfProfileAtIndex(index));
595 } 595 }
596 } 596 }
597 } 597 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/frame/opaque_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698