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

Unified Diff: chrome/browser/ui/views/frame/global_menu_bar_x11.cc

Issue 870203003: [Mac, Linux] Add People in the menu bar should automatically create a default profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/cocoa/profiles/profile_menu_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/global_menu_bar_x11.cc
diff --git a/chrome/browser/ui/views/frame/global_menu_bar_x11.cc b/chrome/browser/ui/views/frame/global_menu_bar_x11.cc
index a19b2c3aba8f64d1b7c0c390bdb482a92e3ddea5..517e833e1de529bce5d27f628f3831dc3cebeb62 100644
--- a/chrome/browser/ui/views/frame/global_menu_bar_x11.cc
+++ b/chrome/browser/ui/views/frame/global_menu_bar_x11.cc
@@ -21,6 +21,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/browser/profiles/profile_window.h"
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/sessions/tab_restore_service_factory.h"
#include "chrome/browser/ui/browser.h"
@@ -897,5 +898,7 @@ void GlobalMenuBarX11::OnEditProfileItemActivated(DbusmenuMenuitem* sender,
void GlobalMenuBarX11::OnCreateProfileItemActivated(DbusmenuMenuitem* sender,
unsigned int timestamp) {
- avatar_menu_->AddNewProfile(ProfileMetrics::ADD_NEW_USER_MENU);
+ profiles::CreateAndSwitchToNewProfile(chrome::HOST_DESKTOP_TYPE_NATIVE,
+ ProfileManager::CreateCallback(),
+ ProfileMetrics::ADD_NEW_USER_MENU);
}
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/profile_menu_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698