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

Unified Diff: chrome/browser/profiles/avatar_menu.cc

Issue 1701563002: Refactor ProfileInfoCache in c/b/ui/views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comments Created 4 years, 10 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/profiles/avatar_menu.h ('k') | chrome/browser/profiles/profile_list_desktop_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/avatar_menu.cc
diff --git a/chrome/browser/profiles/avatar_menu.cc b/chrome/browser/profiles/avatar_menu.cc
index 44ddd789b3987e6503b931e083c0276cbe4d1fb0..ca3c1fa90ba5ada6d3c573ba390c1732a7633b50 100644
--- a/chrome/browser/profiles/avatar_menu.cc
+++ b/chrome/browser/profiles/avatar_menu.cc
@@ -40,15 +40,17 @@
using content::BrowserThread;
-AvatarMenu::AvatarMenu(ProfileInfoInterface* profile_cache,
+AvatarMenu::AvatarMenu(ProfileAttributesStorage* profile_storage,
AvatarMenuObserver* observer,
Browser* browser)
- : profile_list_(ProfileList::Create(profile_cache)),
+ : profile_list_(ProfileList::Create(
+ &g_browser_process->profile_manager()->GetProfileInfoCache())),
menu_actions_(AvatarMenuActions::Create()),
#if defined(ENABLE_SUPERVISED_USERS)
supervised_user_observer_(this),
#endif
- profile_info_(profile_cache),
+ profile_info_(
+ &g_browser_process->profile_manager()->GetProfileInfoCache()),
observer_(observer),
browser_(browser) {
DCHECK(profile_info_);
@@ -156,8 +158,8 @@ size_t AvatarMenu::GetNumberOfItems() const {
const AvatarMenu::Item& AvatarMenu::GetItemAt(size_t index) const {
return profile_list_->GetItemAt(index);
}
-size_t AvatarMenu::GetActiveProfileIndex() {
+size_t AvatarMenu::GetActiveProfileIndex() {
// During singleton profile deletion, this function can be called with no
// profiles in the model - crbug.com/102278 .
if (profile_list_->GetNumberOfItems() == 0)
« no previous file with comments | « chrome/browser/profiles/avatar_menu.h ('k') | chrome/browser/profiles/profile_list_desktop_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698