| 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 | 299 |
| 300 if (tutorial_shown) { | 300 if (tutorial_shown) { |
| 301 chrome::ShowUserManager(profile->GetPath()); | 301 chrome::ShowUserManager(profile->GetPath()); |
| 302 } else { | 302 } else { |
| 303 chrome::ShowUserManagerWithTutorial( | 303 chrome::ShowUserManagerWithTutorial( |
| 304 profiles::USER_MANAGER_TUTORIAL_OVERVIEW); | 304 profiles::USER_MANAGER_TUTORIAL_OVERVIEW); |
| 305 } | 305 } |
| 306 } | 306 } |
| 307 | 307 |
| 308 void EnableNewProfileManagementPreview() { | 308 void EnableNewProfileManagementPreview() { |
| 309 #if defined(OS_ANDROID) |
| 310 NOTREACHED(); |
| 311 #else |
| 309 about_flags::PrefServiceFlagsStorage flags_storage( | 312 about_flags::PrefServiceFlagsStorage flags_storage( |
| 310 g_browser_process->local_state()); | 313 g_browser_process->local_state()); |
| 311 about_flags::SetExperimentEnabled( | 314 about_flags::SetExperimentEnabled( |
| 312 &flags_storage, | 315 &flags_storage, |
| 313 kNewProfileManagementExperimentInternalName, | 316 kNewProfileManagementExperimentInternalName, |
| 314 true); | 317 true); |
| 315 | 318 |
| 316 CommandLine::ForCurrentProcess()->AppendSwitch( | 319 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 317 switches::kNewProfileManagement); | 320 switches::kEnableNewProfileManagement); |
| 318 chrome::ShowUserManagerWithTutorial(profiles::USER_MANAGER_TUTORIAL_OVERVIEW); | 321 chrome::ShowUserManagerWithTutorial(profiles::USER_MANAGER_TUTORIAL_OVERVIEW); |
| 322 #endif |
| 319 } | 323 } |
| 320 | 324 |
| 321 void DisableNewProfileManagementPreview() { | 325 void DisableNewProfileManagementPreview() { |
| 322 about_flags::PrefServiceFlagsStorage flags_storage( | 326 about_flags::PrefServiceFlagsStorage flags_storage( |
| 323 g_browser_process->local_state()); | 327 g_browser_process->local_state()); |
| 324 about_flags::SetExperimentEnabled( | 328 about_flags::SetExperimentEnabled( |
| 325 &flags_storage, | 329 &flags_storage, |
| 326 kNewProfileManagementExperimentInternalName, | 330 kNewProfileManagementExperimentInternalName, |
| 327 false); | 331 false); |
| 328 chrome::AttemptRestart(); | 332 chrome::AttemptRestart(); |
| 329 } | 333 } |
| 330 | 334 |
| 331 } // namespace profiles | 335 } // namespace profiles |
| OLD | NEW |