| OLD | NEW |
| 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 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 DCHECK(throbber_icons_[i]); | 569 DCHECK(throbber_icons_[i]); |
| 570 } | 570 } |
| 571 initialized = true; | 571 initialized = true; |
| 572 } | 572 } |
| 573 } | 573 } |
| 574 | 574 |
| 575 void GlassBrowserFrameView::UpdateAvatarInfo() { | 575 void GlassBrowserFrameView::UpdateAvatarInfo() { |
| 576 if (browser_view_->IsOffTheRecord()) { | 576 if (browser_view_->IsOffTheRecord()) { |
| 577 avatar_button_->SetIcon(browser_view_->GetOTRAvatarIcon()); | 577 avatar_button_->SetIcon(browser_view_->GetOTRAvatarIcon()); |
| 578 } else { | 578 } else { |
| 579 ProfileInfoInterface& cache = | 579 ProfileInfoCache& cache = |
| 580 g_browser_process->profile_manager()->GetProfileInfo(); | 580 g_browser_process->profile_manager()->GetProfileInfoCache(); |
| 581 Profile* profile = browser_view_->browser()->profile(); | 581 Profile* profile = browser_view_->browser()->profile(); |
| 582 size_t index = cache.GetIndexOfProfileWithPath(profile->GetPath()); | 582 size_t index = cache.GetIndexOfProfileWithPath(profile->GetPath()); |
| 583 if (index != std::string::npos) { | 583 if (index != std::string::npos) { |
| 584 avatar_button_->SetIcon(cache.GetAvatarIconOfProfileAtIndex(index)); | 584 avatar_button_->SetIcon(cache.GetAvatarIconOfProfileAtIndex(index)); |
| 585 avatar_button_->SetText(cache.GetNameOfProfileAtIndex(index)); | 585 avatar_button_->SetText(cache.GetNameOfProfileAtIndex(index)); |
| 586 } | 586 } |
| 587 } | 587 } |
| 588 } | 588 } |
| OLD | NEW |