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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 about_flags::PrefServiceFlagsStorage flags_storage( | 343 about_flags::PrefServiceFlagsStorage flags_storage( |
344 g_browser_process->local_state()); | 344 g_browser_process->local_state()); |
345 about_flags::SetExperimentEnabled( | 345 about_flags::SetExperimentEnabled( |
346 &flags_storage, | 346 &flags_storage, |
347 kNewProfileManagementExperimentInternalName, | 347 kNewProfileManagementExperimentInternalName, |
348 false); | 348 false); |
349 chrome::AttemptRestart(); | 349 chrome::AttemptRestart(); |
350 UpdateServicesWithNewProfileManagementFlag(profile, false); | 350 UpdateServicesWithNewProfileManagementFlag(profile, false); |
351 } | 351 } |
352 | 352 |
353 BubbleViewMode BubbleViewModeFromAvatarBubbleMode( | 353 void BubbleViewModeFromAvatarBubbleMode( |
354 BrowserWindow::AvatarBubbleMode mode) { | 354 BrowserWindow::AvatarBubbleMode mode, |
| 355 BubbleViewMode* bubble_view_mode, |
| 356 TutorialMode* tutorial_mode) { |
| 357 *tutorial_mode = TUTORIAL_MODE_NONE; |
355 switch (mode) { | 358 switch (mode) { |
356 case BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT: | 359 case BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT: |
357 return profiles::BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT; | 360 *bubble_view_mode = BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT; |
| 361 return; |
358 case BrowserWindow::AVATAR_BUBBLE_MODE_SIGNIN: | 362 case BrowserWindow::AVATAR_BUBBLE_MODE_SIGNIN: |
359 return profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN; | 363 *bubble_view_mode = BUBBLE_VIEW_MODE_GAIA_SIGNIN; |
| 364 return; |
360 case BrowserWindow::AVATAR_BUBBLE_MODE_ADD_ACCOUNT: | 365 case BrowserWindow::AVATAR_BUBBLE_MODE_ADD_ACCOUNT: |
361 return profiles::BUBBLE_VIEW_MODE_GAIA_ADD_ACCOUNT; | 366 *bubble_view_mode = BUBBLE_VIEW_MODE_GAIA_ADD_ACCOUNT; |
| 367 return; |
362 case BrowserWindow::AVATAR_BUBBLE_MODE_REAUTH: | 368 case BrowserWindow::AVATAR_BUBBLE_MODE_REAUTH: |
363 return profiles::BUBBLE_VIEW_MODE_GAIA_REAUTH; | 369 *bubble_view_mode = BUBBLE_VIEW_MODE_GAIA_REAUTH; |
364 case BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT: | 370 return; |
365 return profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER; | 371 case BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN: |
| 372 *bubble_view_mode = BUBBLE_VIEW_MODE_PROFILE_CHOOSER; |
| 373 *tutorial_mode = TUTORIAL_MODE_CONFIRM_SIGNIN; |
| 374 return; |
| 375 default: |
| 376 *bubble_view_mode = profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER; |
366 } | 377 } |
367 NOTREACHED(); | |
368 return profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER; | |
369 } | 378 } |
370 | 379 |
371 } // namespace profiles | 380 } // namespace profiles |
OLD | NEW |