| Index: chrome/common/profile_management_switches.cc
|
| diff --git a/chrome/common/profile_management_switches.cc b/chrome/common/profile_management_switches.cc
|
| index 8215b99e084ff4e5669bfc027e92f00216d1c57f..a33d62a657566e9109c92ebd2eccd5f6105169cd 100644
|
| --- a/chrome/common/profile_management_switches.cc
|
| +++ b/chrome/common/profile_management_switches.cc
|
| @@ -13,6 +13,18 @@ namespace {
|
| const char kNewProfileManagementFieldTrialName[] = "NewProfileManagement";
|
|
|
| bool CheckProfileManagementFlag(std::string command_switch, bool active_state) {
|
| + // Individiual flag settings take precedence.
|
| + if (CommandLine::ForCurrentProcess()->HasSwitch(command_switch)) {
|
| + return true;
|
| + }
|
| +
|
| + // --new-profile-management flag always affects all switches.
|
| + if (CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kNewProfileManagement)) {
|
| + return active_state;
|
| + }
|
| +
|
| + // NewProfileManagement experiment acts like above flag.
|
| std::string trial_type =
|
| base::FieldTrialList::FindFullName(kNewProfileManagementFieldTrialName);
|
| if (!trial_type.empty()) {
|
| @@ -21,7 +33,8 @@ bool CheckProfileManagementFlag(std::string command_switch, bool active_state) {
|
| if (trial_type == "Disabled")
|
| return !active_state;
|
| }
|
| - return CommandLine::ForCurrentProcess()->HasSwitch(command_switch);
|
| +
|
| + return false;
|
| }
|
|
|
| } // namespace
|
|
|