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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 // args, we should set a profile preference. | 470 // args, we should set a profile preference. |
471 const about_flags::FeatureEntry entry = { | 471 const about_flags::FeatureEntry entry = { |
472 kNewProfileManagementExperimentInternalName, | 472 kNewProfileManagementExperimentInternalName, |
473 0, // string id for title of experiment | 473 0, // string id for title of experiment |
474 0, // string id for description of experiment | 474 0, // string id for description of experiment |
475 0, // supported platforms | 475 0, // supported platforms |
476 about_flags::FeatureEntry::ENABLE_DISABLE_VALUE, | 476 about_flags::FeatureEntry::ENABLE_DISABLE_VALUE, |
477 switches::kEnableNewProfileManagement, | 477 switches::kEnableNewProfileManagement, |
478 "", // not used with ENABLE_DISABLE_VALUE type | 478 "", // not used with ENABLE_DISABLE_VALUE type |
479 switches::kDisableNewProfileManagement, | 479 switches::kDisableNewProfileManagement, |
480 "", // not used with ENABLE_DISABLE_VALUE type | 480 "", // not used with ENABLE_DISABLE_VALUE type |
481 NULL, // not used with ENABLE_DISABLE_VALUE type | 481 nullptr, // not used with ENABLE_DISABLE_VALUE type |
482 3 | 482 nullptr, // not used with ENABLE_DISABLE_VALUE type |
483 }; | 483 3}; |
484 flags_ui::PrefServiceFlagsStorage flags_storage( | 484 flags_ui::PrefServiceFlagsStorage flags_storage( |
485 g_browser_process->local_state()); | 485 g_browser_process->local_state()); |
486 about_flags::SetFeatureEntryEnabled(&flags_storage, entry.NameForChoice(1), | 486 about_flags::SetFeatureEntryEnabled(&flags_storage, entry.NameForChoice(1), |
487 true); | 487 true); |
488 | 488 |
489 switches::EnableNewProfileManagementForTesting( | 489 switches::EnableNewProfileManagementForTesting( |
490 base::CommandLine::ForCurrentProcess()); | 490 base::CommandLine::ForCurrentProcess()); |
491 UserManager::Show(base::FilePath(), | 491 UserManager::Show(base::FilePath(), |
492 profiles::USER_MANAGER_TUTORIAL_OVERVIEW, | 492 profiles::USER_MANAGER_TUTORIAL_OVERVIEW, |
493 profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION); | 493 profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 PrefService* local_state = g_browser_process->local_state(); | 556 PrefService* local_state = g_browser_process->local_state(); |
557 const bool dismissed = local_state->GetBoolean( | 557 const bool dismissed = local_state->GetBoolean( |
558 prefs::kProfileAvatarRightClickTutorialDismissed); | 558 prefs::kProfileAvatarRightClickTutorialDismissed); |
559 | 559 |
560 // Don't show the tutorial if it's already been dismissed or if right-clicking | 560 // Don't show the tutorial if it's already been dismissed or if right-clicking |
561 // wouldn't show any targets. | 561 // wouldn't show any targets. |
562 return !dismissed && HasProfileSwitchTargets(profile); | 562 return !dismissed && HasProfileSwitchTargets(profile); |
563 } | 563 } |
564 | 564 |
565 } // namespace profiles | 565 } // namespace profiles |
OLD | NEW |