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