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

Unified Diff: chrome/browser/ui/gtk/profile_menu_button.cc

Issue 7321011: Multi-Profiles: Add delete profile command (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Multi-Profiles: Add delete profile command Created 9 years, 5 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/gtk/profile_menu_button.h ('k') | chrome/browser/ui/profile_menu_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/profile_menu_button.cc
===================================================================
--- chrome/browser/ui/gtk/profile_menu_button.cc (revision 91776)
+++ chrome/browser/ui/gtk/profile_menu_button.cc (working copy)
@@ -15,8 +15,8 @@
// Maximum width for name string in pixels.
const int kMaxTextWidth = 200;
-ProfileMenuButton::ProfileMenuButton() {
- profile_menu_model_.reset(new ProfileMenuModel);
+ProfileMenuButton::ProfileMenuButton(Profile* profile) : profile_(profile) {
+ profile_menu_model_.reset(new ProfileMenuModel(profile_));
menu_.reset(new MenuGtk(NULL, profile_menu_model_.get()));
widget_.Own(gtk_button_new());
@@ -28,9 +28,9 @@
ProfileMenuButton::~ProfileMenuButton() {}
-void ProfileMenuButton::UpdateText(Profile* profile) {
+void ProfileMenuButton::UpdateText() {
string16 text = UTF8ToUTF16(
- profile->GetPrefs()->GetString(prefs::kGoogleServicesUsername));
+ profile_->GetPrefs()->GetString(prefs::kGoogleServicesUsername));
string16 elided_text = ui::ElideText(text, gfx::Font(), kMaxTextWidth, false);
gtk_button_set_label(
GTK_BUTTON(widget_.get()), UTF16ToUTF8(elided_text).c_str());
« no previous file with comments | « chrome/browser/ui/gtk/profile_menu_button.h ('k') | chrome/browser/ui/profile_menu_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698