| 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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |