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

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

Issue 1138523005: [Smart Lock] Update password generation prompt to conditionally use new branding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments 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
« no previous file with comments | « chrome/browser/ui/passwords/password_bubble_experiment.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/passwords/password_bubble_experiment.h" 5 #include "chrome/browser/ui/passwords/password_bubble_experiment.h"
6 6
7 #include "base/metrics/field_trial.h" 7 #include "base/metrics/field_trial.h"
8 #include "chrome/browser/password_manager/password_manager_util.h" 8 #include "chrome/browser/password_manager/password_manager_util.h"
9 #include "chrome/browser/signin/signin_manager_factory.h" 9 #include "chrome/browser/signin/signin_manager_factory.h"
10 #include "chrome/browser/sync/profile_sync_service_factory.h" 10 #include "chrome/browser/sync/profile_sync_service_factory.h"
11 11
12 namespace password_bubble_experiment { 12 namespace password_bubble_experiment {
13 namespace { 13 namespace {
14 14
15 const char kBrandingExperimentName[] = "PasswordBubbleBranding"; 15 const char kBrandingExperimentName[] = "PasswordBranding";
vabr (Chromium) 2015/05/15 11:24:45 I'll change the Finch config in the internal CL 93
16 const char kSmartLockBrandingGroupName[] = "SmartLockBranding"; 16 const char kSmartLockBrandingGroupName[] = "SmartLockBranding";
17 17
18 } // namespace 18 } // namespace
19 19
20 void RecordBubbleClosed( 20 void RecordBubbleClosed(
21 PrefService* prefs, 21 PrefService* prefs,
22 password_manager::metrics_util::UIDismissalReason reason) { 22 password_manager::metrics_util::UIDismissalReason reason) {
23 // TODO(vasilii): store the statistics. 23 // TODO(vasilii): store the statistics.
24 } 24 }
25 25
26 bool IsEnabledSmartLockBranding(Profile* profile) { 26 bool IsSmartLockBrandingEnabled(Profile* profile) {
27 const ProfileSyncService* sync_service = 27 const ProfileSyncService* sync_service =
28 ProfileSyncServiceFactory::GetForProfile(profile); 28 ProfileSyncServiceFactory::GetForProfile(profile);
29 return password_manager_util::GetPasswordSyncState(sync_service) && 29 if (password_manager_util::GetPasswordSyncState(sync_service) !=
30 base::FieldTrialList::FindFullName(kBrandingExperimentName) == 30 password_manager::SYNCING_NORMAL_ENCRYPTION)
31 kSmartLockBrandingGroupName; 31 return false;
32
33 return base::FieldTrialList::FindFullName(kBrandingExperimentName) ==
34 kSmartLockBrandingGroupName;
32 } 35 }
33 36
34
35 } // namespace password_bubble_experiment 37 } // namespace password_bubble_experiment
OLDNEW
« no previous file with comments | « chrome/browser/ui/passwords/password_bubble_experiment.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698