Index: chrome/browser/ui/views/user_manager_view.cc |
diff --git a/chrome/browser/ui/views/user_manager_view.cc b/chrome/browser/ui/views/user_manager_view.cc |
index bf72bbbac3fa997cc194919cdf673747573bc2e0..aeef687ceec7ba936c48dc08683690e985f78119 100644 |
--- a/chrome/browser/ui/views/user_manager_view.cc |
+++ b/chrome/browser/ui/views/user_manager_view.cc |
@@ -46,7 +46,7 @@ namespace chrome { |
// Declared in browser_dialogs.h so others don't have to depend on this header. |
void ShowUserManager(const base::FilePath& profile_path_to_focus) { |
- UserManagerView::Show(profile_path_to_focus); |
+ UserManagerView::Show(profile_path_to_focus, false); |
} |
void HideUserManager() { |
@@ -68,7 +68,8 @@ UserManagerView::~UserManagerView() { |
} |
// static |
-void UserManagerView::Show(const base::FilePath& profile_path_to_focus) { |
+void UserManagerView::Show(const base::FilePath& profile_path_to_focus, |
+ bool show_tutorial) { |
ProfileMetrics::LogProfileSwitchUser(ProfileMetrics::OPEN_USER_MANAGER); |
if (instance_) { |
// If there's a user manager window open already, just activate it. |
@@ -82,7 +83,8 @@ void UserManagerView::Show(const base::FilePath& profile_path_to_focus) { |
profile_manager->CreateProfileAsync( |
ProfileManager::GetGuestProfilePath(), |
base::Bind(&UserManagerView::OnGuestProfileCreated, |
- profile_path_to_focus), |
+ profile_path_to_focus, |
+ show_tutorial), |
Alexei Svitkine (slow)
2014/03/14 21:04:40
I do wonder if there's a way to design this so tha
noms (inactive)
2014/03/17 21:52:23
Added a helper function in profile_window.cc that
|
base::string16(), |
base::string16(), |
std::string()); |
@@ -101,6 +103,7 @@ bool UserManagerView::IsShowing() { |
void UserManagerView::OnGuestProfileCreated( |
const base::FilePath& profile_path_to_focus, |
+ bool show_tutorial, |
Profile* guest_profile, |
Profile::CreateStatus status) { |
if (status != Profile::CREATE_STATUS_INITIALIZED) |
@@ -124,7 +127,9 @@ void UserManagerView::OnGuestProfileCreated( |
// Tell the webui which user pod should be focused. |
std::string page = chrome::kChromeUIUserManagerURL; |
- if (!profile_path_to_focus.empty()) { |
+ if (show_tutorial) { |
+ page += "#tutorial"; |
+ } else if (!profile_path_to_focus.empty()) { |
ProfileInfoCache& cache = |
g_browser_process->profile_manager()->GetProfileInfoCache(); |
size_t index = cache.GetIndexOfProfileWithPath(profile_path_to_focus); |