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

Side by Side Diff: chrome/browser/profiles/profile_window.cc

Issue 631163004: Mac - show user manager before opening browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use different app_controller_mac method. use different TaskMgr call. Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/profile_window.h" 5 #include "chrome/browser/profiles/profile_window.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 if (index != std::string::npos) { 162 if (index != std::string::npos) {
163 page += "#"; 163 page += "#";
164 page += base::IntToString(index); 164 page += base::IntToString(index);
165 } 165 }
166 } else if (profile_open_action == 166 } else if (profile_open_action ==
167 profiles::USER_MANAGER_SELECT_PROFILE_TASK_MANAGER) { 167 profiles::USER_MANAGER_SELECT_PROFILE_TASK_MANAGER) {
168 page += profiles::kUserManagerSelectProfileTaskManager; 168 page += profiles::kUserManagerSelectProfileTaskManager;
169 } else if (profile_open_action == 169 } else if (profile_open_action ==
170 profiles::USER_MANAGER_SELECT_PROFILE_ABOUT_CHROME) { 170 profiles::USER_MANAGER_SELECT_PROFILE_ABOUT_CHROME) {
171 page += profiles::kUserManagerSelectProfileAboutChrome; 171 page += profiles::kUserManagerSelectProfileAboutChrome;
172 } else if (profile_open_action ==
173 profiles::USER_MANAGER_SELECT_PROFILE_CHROME_SETTINGS) {
174 page += profiles::kUserManagerSelectProfileChromeSettings;
172 } 175 }
173 callback.Run(guest_profile, page); 176 callback.Run(guest_profile, page);
174 } 177 }
175 178
176 // Updates Chrome services that require notification when 179 // Updates Chrome services that require notification when
177 // the new_profile_management's status changes. 180 // the new_profile_management's status changes.
178 void UpdateServicesWithNewProfileManagementFlag(Profile* profile, 181 void UpdateServicesWithNewProfileManagementFlag(Profile* profile,
179 bool new_flag_status) { 182 bool new_flag_status) {
180 AccountReconcilor* account_reconcilor = 183 AccountReconcilor* account_reconcilor =
181 AccountReconcilorFactory::GetForProfile(profile); 184 AccountReconcilorFactory::GetForProfile(profile);
182 account_reconcilor->OnNewProfileManagementFlagChanged(new_flag_status); 185 account_reconcilor->OnNewProfileManagementFlagChanged(new_flag_status);
183 } 186 }
184 187
185 } // namespace 188 } // namespace
186 189
187 namespace profiles { 190 namespace profiles {
188 191
189 // User Manager parameters are prefixed with hash. 192 // User Manager parameters are prefixed with hash.
190 const char kUserManagerDisplayTutorial[] = "#tutorial"; 193 const char kUserManagerDisplayTutorial[] = "#tutorial";
191 const char kUserManagerSelectProfileTaskManager[] = "#task-manager"; 194 const char kUserManagerSelectProfileTaskManager[] = "#task-manager";
192 const char kUserManagerSelectProfileAboutChrome[] = "#about-chrome"; 195 const char kUserManagerSelectProfileAboutChrome[] = "#about-chrome";
196 const char kUserManagerSelectProfileChromeSettings[] = "#chrome-settings";
193 197
194 void FindOrCreateNewWindowForProfile( 198 void FindOrCreateNewWindowForProfile(
195 Profile* profile, 199 Profile* profile,
196 chrome::startup::IsProcessStartup process_startup, 200 chrome::startup::IsProcessStartup process_startup,
197 chrome::startup::IsFirstRun is_first_run, 201 chrome::startup::IsFirstRun is_first_run,
198 chrome::HostDesktopType desktop_type, 202 chrome::HostDesktopType desktop_type,
199 bool always_create) { 203 bool always_create) {
200 #if defined(OS_IOS) 204 #if defined(OS_IOS)
201 NOTREACHED(); 205 NOTREACHED();
202 #else 206 #else
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 case BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR: 424 case BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR:
421 *bubble_view_mode = BUBBLE_VIEW_MODE_PROFILE_CHOOSER; 425 *bubble_view_mode = BUBBLE_VIEW_MODE_PROFILE_CHOOSER;
422 *tutorial_mode = TUTORIAL_MODE_SHOW_ERROR; 426 *tutorial_mode = TUTORIAL_MODE_SHOW_ERROR;
423 return; 427 return;
424 default: 428 default:
425 *bubble_view_mode = profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER; 429 *bubble_view_mode = profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER;
426 } 430 }
427 } 431 }
428 432
429 } // namespace profiles 433 } // namespace profiles
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698