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

Side by Side Diff: chrome/browser/ui/passwords/password_bubble_experiment.cc

Issue 1133613007: Move password_manager_util and password_bubble_experiment to components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@486739_componentise_experiment_utils_to_ios_sources
Patch Set: Created 5 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/passwords/password_bubble_experiment.h"
6
7 #include "base/metrics/field_trial.h"
8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/password_manager/password_manager_util.h"
10
11 namespace password_bubble_experiment {
12 namespace {
13
14 const char kBrandingExperimentName[] = "PasswordBranding";
15 const char kSmartLockBrandingGroupName[] = "SmartLockBranding";
16
17 } // namespace
18
19 void RecordBubbleClosed(
20 PrefService* prefs,
21 password_manager::metrics_util::UIDismissalReason reason) {
22 // TODO(vasilii): store the statistics.
23 }
24
25 bool IsSmartLockBrandingEnabled(const sync_driver::SyncService* sync_service) {
26 return password_manager_util::GetPasswordSyncState(sync_service) ==
27 password_manager::SYNCING_NORMAL_ENCRYPTION &&
28 base::FieldTrialList::FindFullName(kBrandingExperimentName) ==
29 kSmartLockBrandingGroupName;
30 }
31
32 } // namespace password_bubble_experiment
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698