Chromium Code Reviews| Index: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc |
| diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc |
| index 42367b07144e1690ae19904f56f680cba12bf428..a7b756234389872b5eb2343e4688d77b8d0831f7 100644 |
| --- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc |
| +++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc |
| @@ -65,6 +65,7 @@ |
| #include "chrome/browser/chromeos/login/user_manager.h" |
| #include "chrome/browser/chromeos/options/network_config_view.h" |
| #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" |
| +#include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h" |
| #include "chrome/browser/chromeos/settings/cros_settings.h" |
| #include "chrome/browser/chromeos/sim_dialog_delegate.h" |
| #include "chrome/browser/chromeos/system_key_event_listener.h" |
| @@ -238,6 +239,12 @@ void ShowNetworkSettingsPage(const std::string& service_path) { |
| ProfileManager::GetPrimaryUserProfile()); |
| } |
| +void onAcceptMultiprofilesIntro(bool no_show_again) { |
|
Nikita (slow)
2014/01/14 13:44:11
nit: Capitalize.
merkulova
2014/01/14 14:29:34
Done.
|
| + PrefService* prefs = ProfileManager::GetActiveUserProfile()->GetPrefs(); |
| + prefs->SetBoolean(prefs::kMultiProfileNeverShowIntro, no_show_again); |
| + UserAddingScreen::Get()->Start(); |
| +} |
| + |
| class SystemTrayDelegate : public ash::SystemTrayDelegate, |
| public SessionManagerClient::Observer, |
| public drive::JobListObserver, |
| @@ -629,8 +636,16 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, |
| return; |
| // Launch sign in screen to add another user to current session. |
| - if (UserManager::Get()->GetUsersAdmittedForMultiProfile().size()) |
| - UserAddingScreen::Get()->Start(); |
| + if (UserManager::Get()->GetUsersAdmittedForMultiProfile().size()) { |
| + bool show_intro = !ProfileManager::GetActiveUserProfile()-> |
| + GetPrefs()->GetBoolean(prefs::kMultiProfileNeverShowIntro); |
| + base::Callback<void(bool)> on_accept = base::Bind( |
|
Nikita (slow)
2014/01/14 13:44:11
nit: Move base::Bind( to next line so that whole c
merkulova
2014/01/14 14:29:34
Done.
|
| + &onAcceptMultiprofilesIntro); |
| + if (show_intro) |
| + ShowMultiprofilesIntroDialog(on_accept); |
| + else |
| + UserAddingScreen::Get()->Start(); |
| + } |
| } |
| virtual void ShowSpringChargerReplacementDialog() OVERRIDE { |