Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(417)

Unified Diff: components/password_manager/core/common/experiments.cc

Issue 682133003: [Password Manager] Add link to remotely manage passowrds on desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698