OLD | NEW |
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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 page += profiles::kUserManagerSelectProfileTaskManager; | 206 page += profiles::kUserManagerSelectProfileTaskManager; |
207 } else if (profile_open_action == | 207 } else if (profile_open_action == |
208 profiles::USER_MANAGER_SELECT_PROFILE_ABOUT_CHROME) { | 208 profiles::USER_MANAGER_SELECT_PROFILE_ABOUT_CHROME) { |
209 page += profiles::kUserManagerSelectProfileAboutChrome; | 209 page += profiles::kUserManagerSelectProfileAboutChrome; |
210 } else if (profile_open_action == | 210 } else if (profile_open_action == |
211 profiles::USER_MANAGER_SELECT_PROFILE_CHROME_SETTINGS) { | 211 profiles::USER_MANAGER_SELECT_PROFILE_CHROME_SETTINGS) { |
212 page += profiles::kUserManagerSelectProfileChromeSettings; | 212 page += profiles::kUserManagerSelectProfileChromeSettings; |
213 } else if (profile_open_action == | 213 } else if (profile_open_action == |
214 profiles::USER_MANAGER_SELECT_PROFILE_CHROME_MEMORY) { | 214 profiles::USER_MANAGER_SELECT_PROFILE_CHROME_MEMORY) { |
215 page += profiles::kUserManagerSelectProfileChromeMemory; | 215 page += profiles::kUserManagerSelectProfileChromeMemory; |
| 216 } else if (profile_open_action == |
| 217 profiles::USER_MANAGER_SELECT_PROFILE_APP_LAUNCHER) { |
| 218 page += profiles::kUserManagerSelectProfileAppLauncher; |
216 } | 219 } |
217 callback.Run(system_profile, page); | 220 callback.Run(system_profile, page); |
218 } | 221 } |
219 | 222 |
220 // Updates Chrome services that require notification when | 223 // Updates Chrome services that require notification when |
221 // the new_profile_management's status changes. | 224 // the new_profile_management's status changes. |
222 void UpdateServicesWithNewProfileManagementFlag(Profile* profile, | 225 void UpdateServicesWithNewProfileManagementFlag(Profile* profile, |
223 bool new_flag_status) { | 226 bool new_flag_status) { |
224 AccountReconcilor* account_reconcilor = | 227 AccountReconcilor* account_reconcilor = |
225 AccountReconcilorFactory::GetForProfile(profile); | 228 AccountReconcilorFactory::GetForProfile(profile); |
226 account_reconcilor->OnNewProfileManagementFlagChanged(new_flag_status); | 229 account_reconcilor->OnNewProfileManagementFlagChanged(new_flag_status); |
227 } | 230 } |
228 | 231 |
229 } // namespace | 232 } // namespace |
230 | 233 |
231 namespace profiles { | 234 namespace profiles { |
232 | 235 |
233 // User Manager parameters are prefixed with hash. | 236 // User Manager parameters are prefixed with hash. |
234 const char kUserManagerDisplayTutorial[] = "#tutorial"; | 237 const char kUserManagerDisplayTutorial[] = "#tutorial"; |
235 const char kUserManagerSelectProfileTaskManager[] = "#task-manager"; | 238 const char kUserManagerSelectProfileTaskManager[] = "#task-manager"; |
236 const char kUserManagerSelectProfileAboutChrome[] = "#about-chrome"; | 239 const char kUserManagerSelectProfileAboutChrome[] = "#about-chrome"; |
237 const char kUserManagerSelectProfileChromeSettings[] = "#chrome-settings"; | 240 const char kUserManagerSelectProfileChromeSettings[] = "#chrome-settings"; |
238 const char kUserManagerSelectProfileChromeMemory[] = "#chrome-memory"; | 241 const char kUserManagerSelectProfileChromeMemory[] = "#chrome-memory"; |
| 242 const char kUserManagerSelectProfileAppLauncher[] = "#app-launcher"; |
239 | 243 |
240 void FindOrCreateNewWindowForProfile( | 244 void FindOrCreateNewWindowForProfile( |
241 Profile* profile, | 245 Profile* profile, |
242 chrome::startup::IsProcessStartup process_startup, | 246 chrome::startup::IsProcessStartup process_startup, |
243 chrome::startup::IsFirstRun is_first_run, | 247 chrome::startup::IsFirstRun is_first_run, |
244 chrome::HostDesktopType desktop_type, | 248 chrome::HostDesktopType desktop_type, |
245 bool always_create) { | 249 bool always_create) { |
246 #if defined(OS_IOS) | 250 #if defined(OS_IOS) |
247 NOTREACHED(); | 251 NOTREACHED(); |
248 #else | 252 #else |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 case BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR: | 503 case BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR: |
500 *bubble_view_mode = BUBBLE_VIEW_MODE_PROFILE_CHOOSER; | 504 *bubble_view_mode = BUBBLE_VIEW_MODE_PROFILE_CHOOSER; |
501 *tutorial_mode = TUTORIAL_MODE_SHOW_ERROR; | 505 *tutorial_mode = TUTORIAL_MODE_SHOW_ERROR; |
502 return; | 506 return; |
503 default: | 507 default: |
504 *bubble_view_mode = profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER; | 508 *bubble_view_mode = profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER; |
505 } | 509 } |
506 } | 510 } |
507 | 511 |
508 } // namespace profiles | 512 } // namespace profiles |
OLD | NEW |