blob: 9d83ccb42f67875142954fb78e12396556027e69 [file] [log] [blame]
// 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.
class PrefRegistrySimple;
class PrefService;
namespace syncer {
class SyncService;
namespace password_bubble_experiment {
extern const char kSmartBubbleExperimentName[];
extern const char kSmartBubbleThresholdParam[];
// Registers prefs which controls appearance of the first run experience for the
// Smart Lock UI, namely was first run experience shown for save prompt or auto
// sign-in prompt.
void RegisterPrefs(PrefRegistrySimple* registry);
// Returns the number of times the "Save password" bubble can be dismissed by
// user before it's not shown automatically.
int GetSmartBubbleDismissalThreshold();
// Returns true if the user syncs passwords to Google Account.
// TODO( rename the function.
bool IsSmartLockUser(const syncer::SyncService* sync_service);
// Returns true if first run experience for auto sign-in prompt should be shown.
bool ShouldShowAutoSignInPromptFirstRunExperience(PrefService* prefs);
// Sets appropriate value to the preference which controls appearance of the
// first run experience for the auto sign-in prompt.
void RecordAutoSignInPromptFirstRunExperienceWasShown(PrefService* prefs);
// Turns off the auto signin experience setting.
void TurnOffAutoSignin(PrefService* prefs);
// Returns true if the Chrome Sign In promo should be shown.
bool ShouldShowChromeSignInPasswordPromo(
PrefService* prefs,
const syncer::SyncService* sync_service);
} // namespace password_bubble_experiment