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

Unified Diff: chrome/browser/ui/app_list/app_list_view_delegate.cc

Issue 23179002: Update the app launcher menu on profile name change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@le_refactor_gigante_signin_into_model
Patch Set: rebase Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/app_list/app_list_view_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/app_list_view_delegate.cc
diff --git a/chrome/browser/ui/app_list/app_list_view_delegate.cc b/chrome/browser/ui/app_list/app_list_view_delegate.cc
index cf3810a97bf11aa81115d0e603f7dd5619f307b4..699697c4dfdd03863856e1ac6d514cc282bd8331 100644
--- a/chrome/browser/ui/app_list/app_list_view_delegate.cc
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc
@@ -65,11 +65,14 @@ AppListViewDelegate::AppListViewDelegate(AppListControllerDelegate* controller,
content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_GOOGLE_SIGNED_OUT,
content::Source<Profile>(profile_));
+ g_browser_process->profile_manager()->GetProfileInfoCache().AddObserver(this);
}
AppListViewDelegate::~AppListViewDelegate() {
if (signin_delegate_)
signin_delegate_->RemoveObserver(this);
+ g_browser_process->
+ profile_manager()->GetProfileInfoCache().RemoveObserver(this);
}
void AppListViewDelegate::OnProfileChanged() {
@@ -232,3 +235,12 @@ void AppListViewDelegate::Observe(
const content::NotificationDetails& details) {
OnProfileChanged();
}
+
+void AppListViewDelegate::OnProfileNameChanged(
+ const base::FilePath& profile_path,
+ const base::string16& old_profile_name) {
+ if (profile_->GetPath() != profile_path)
+ return;
+
+ OnProfileChanged();
+}
« no previous file with comments | « chrome/browser/ui/app_list/app_list_view_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698