| Index: components/password_manager/core/common/experiments.cc
|
| diff --git a/components/password_manager/core/common/experiments.cc b/components/password_manager/core/common/experiments.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8a49e368fef1de7ee7b2e585b0e659f28f3f8b9e
|
| --- /dev/null
|
| +++ b/components/password_manager/core/common/experiments.cc
|
| @@ -0,0 +1,27 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "components/password_manager/core/common/experiments.h"
|
| +
|
| +#include "base/command_line.h"
|
| +#include "base/metrics/field_trial.h"
|
| +#include "components/password_manager/core/common/password_manager_switches.h"
|
| +
|
| +namespace password_manager {
|
| +
|
| +bool ManageAccountLinkExperimentEnabled() {
|
| + std::string group_name =
|
| + base::FieldTrialList::FindFullName("PasswordLinkInSettings");
|
| +
|
| + CommandLine* command_line = CommandLine::ForCurrentProcess();
|
| + if (command_line->HasSwitch(switches::kDisablePasswordLink))
|
| + return false;
|
| +
|
| + if (command_line->HasSwitch(switches::kEnablePasswordLink))
|
| + return true;
|
| +
|
| + return group_name == "Enabled";
|
| +}
|
| +
|
| +} // namespace password_manager
|
|
|