OLD | NEW |
(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 #ifndef CHROME_BROWSER_UI_PASSWORDS_PASSWORD_BUBBLE_EXPERIMENT_H_ |
| 6 #define CHROME_BROWSER_UI_PASSWORDS_PASSWORD_BUBBLE_EXPERIMENT_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "components/password_manager/core/browser/password_manager_metrics_util
.h" |
| 10 |
| 11 namespace user_prefs { |
| 12 class PrefRegistrySyncable; |
| 13 } |
| 14 |
| 15 class PrefService; |
| 16 |
| 17 // These functions handle the algorithms according to which the "Save password?" |
| 18 // bubble is shown to user. |
| 19 namespace password_bubble_experiment { |
| 20 |
| 21 void RegisterPrefs(user_prefs::PrefRegistrySyncable* registry); |
| 22 |
| 23 // The decision is made based on the "PasswordBubbleAlgorithm" finch experiment. |
| 24 // The default value is true. |
| 25 // It should be called before showing the "Save Password?" dialog. |
| 26 bool ShouldShowBubble(PrefService* prefs); |
| 27 |
| 28 // Should be called when user dismisses the "Save Password?" dialog. It stores |
| 29 // the statistics about interactions with the bubble. |
| 30 void RecordBubbleClosed( |
| 31 PrefService* prefs, |
| 32 password_manager::metrics_util::UIDismissalReason reason); |
| 33 |
| 34 // The name of the finch experiment controlling the algorithm. |
| 35 extern const char kExperimentName[]; |
| 36 |
| 37 // The group name for the time based algorithm. |
| 38 extern const char kGroupTimeSpanBased[]; |
| 39 |
| 40 // The group name for the probability algorithm. |
| 41 extern const char kGroupProbabilityBased[]; |
| 42 |
| 43 // For "Probability" group. The additional "Saves" to be added to the model. |
| 44 extern const char kParamProbabilityFakeSaves[]; |
| 45 |
| 46 // For "Probability" group. The interaction history length. |
| 47 extern const char kParamProbabilityInteractionsCount[]; |
| 48 |
| 49 // For "TimeSpan" group. The time span until the nope counter is zeroed. |
| 50 extern const char kParamTimeSpan[]; |
| 51 |
| 52 // For "TimeSpan" group. The nopes threshold. |
| 53 extern const char kParamTimeSpanNopeThreshold[]; |
| 54 |
| 55 } // namespace password_bubble_experiment |
| 56 |
| 57 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORD_BUBBLE_EXPERIMENT_H_ |
OLD | NEW |