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

Unified Diff: components/password_manager/core/browser/password_manager_url_collection_experiment.h

Issue 789613004: Decision whenever "Allow to collect URL?" bubble should be shown or not (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
Index: components/password_manager/core/browser/password_manager_url_collection_experiment.h
diff --git a/components/password_manager/core/browser/password_manager_url_collection_experiment.h b/components/password_manager/core/browser/password_manager_url_collection_experiment.h
index f5eb39aeec72a69cb24b15241164a398f6bb8adf..0d2b9d09af47b900822c8cddf365520f19e8f774 100644
--- a/components/password_manager/core/browser/password_manager_url_collection_experiment.h
+++ b/components/password_manager/core/browser/password_manager_url_collection_experiment.h
@@ -5,6 +5,8 @@
#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_URL_COLLECTION_EXPERIMENT_H_
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_URL_COLLECTION_EXPERIMENT_H_
+#include "base/time/time.h"
+
namespace user_prefs {
class PrefRegistrySyncable;
}
@@ -18,11 +20,14 @@ namespace urls_collection_experiment {
void RegisterPrefs(user_prefs::PrefRegistrySyncable* registry);
+// Implements an algorithm determining when the period starts, in which "Allow
+// to collect URL?" bubble can be shown.
+base::Time DetermineStartOfActivityPeriod(PrefService* prefs,
+ int experiment_length_in_days);
// Based on |prefs| and experiment settings, decides whether to show the
// "Allow to collect URL?" bubble and should be called before showing it.
// The default value is false.
bool ShouldShowBubble(PrefService* prefs);
-
// Should be called when user dismisses the "Allow to collect URL?" bubble.
// It stores the statistics about interactions with the bubble in |prefs|.
void RecordBubbleClosed(PrefService* prefs);
@@ -30,6 +35,17 @@ void RecordBubbleClosed(PrefService* prefs);
// The name of the finch experiment controlling the algorithm.
extern const char kExperimentName[];
+// The name of the experiment parameter, value of which determines determines
+// how long the experiment is active.
+extern const char kParamExperimentLengthInDays[];
+
+// The bubble is shown only once and only within a certain period. The length of
+// the period is the value of the experiment parameter |kParamTimePeriodInDays|.
+extern const char kParamActivePeriodInDays[];
+/// The name of the experiment parameter, value of which defines whether
+// the bubble should appear or not.
+extern const char kParamBubbleStatus[];
+
} // namespace urls_collection_experiment
} // namespace password_manager

Powered by Google App Engine
This is Rietveld 408576698