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

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

Issue 777423004: Skeleton code for experiment setup, which will determine should "Allow to collect URL?" bubble be s… (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 96f7c280bd1aaf0f5110a2375d8954e17912b809..f5eb39aeec72a69cb24b15241164a398f6bb8adf 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,10 @@
#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_URL_COLLECTION_EXPERIMENT_H_
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_URL_COLLECTION_EXPERIMENT_H_
+namespace user_prefs {
+class PrefRegistrySyncable;
+}
+
class PrefService;
// These functions implement the algorithms according to which the "Allow to
@@ -12,11 +16,20 @@ class PrefService;
namespace password_manager {
namespace urls_collection_experiment {
+void RegisterPrefs(user_prefs::PrefRegistrySyncable* registry);
+
// 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);
+
+// The name of the finch experiment controlling the algorithm.
+extern const char kExperimentName[];
+
} // namespace urls_collection_experiment
} // namespace password_manager

Powered by Google App Engine
This is Rietveld 408576698