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

Unified Diff: chrome/browser/signin/easy_unlock.cc

Issue 410713002: Control easy unlock by a field trial. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: follow finch-and-flags pattern Created 6 years, 5 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
« no previous file with comments | « chrome/browser/signin/easy_unlock.h ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/easy_unlock.cc
diff --git a/chrome/browser/signin/easy_unlock.cc b/chrome/browser/signin/easy_unlock.cc
index 62992119e3232bcdd42c105a7998b0cb8b4d2024..2a094526142ba181aeb58e85adaba3c82e91dd2f 100644
--- a/chrome/browser/signin/easy_unlock.cc
+++ b/chrome/browser/signin/easy_unlock.cc
@@ -4,10 +4,13 @@
#include "chrome/browser/signin/easy_unlock.h"
+#include "base/command_line.h"
+#include "base/metrics/field_trial.h"
#include "base/values.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/extensions/application_launch.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "extensions/browser/extension_system.h"
@@ -40,4 +43,14 @@ void LaunchEasyUnlockSetup(Profile* profile) {
profile, extension, extensions::LAUNCH_CONTAINER_WINDOW, NEW_WINDOW));
}
+bool IsEnabled() {
+ const std::string group_name =
+ base::FieldTrialList::FindFullName("EasyUnlock");
Andrew T Wilson (Slow) 2014/07/24 09:50:25 Move this line down after the check for the comman
Alexei Svitkine (slow) 2014/07/24 14:10:26 That will not produce correct results per go/finch
xiyuan 2014/07/25 17:47:26 Done.
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableEasyUnlock)) {
+ return true;
+ }
+ return group_name == "Enable";
+}
+
} // namespace easy_unlock
« no previous file with comments | « chrome/browser/signin/easy_unlock.h ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698