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

Unified Diff: chrome/browser/bookmarks/enhanced_bookmarks_features.h

Issue 265843009: Restored an option to enable enhanced bookmarks experiment from Finch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: one more unit test fix Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/bookmarks/enhanced_bookmarks_features.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/enhanced_bookmarks_features.h
diff --git a/chrome/browser/bookmarks/enhanced_bookmarks_features.h b/chrome/browser/bookmarks/enhanced_bookmarks_features.h
index c3bf9591dc17834bc481ccc26d2ad621cd0a0dee..f67c96a11dfad6e7fdb9789607741b76ef82cf22 100644
--- a/chrome/browser/bookmarks/enhanced_bookmarks_features.h
+++ b/chrome/browser/bookmarks/enhanced_bookmarks_features.h
@@ -11,18 +11,37 @@
class PrefService;
+// States for bookmark experiment. They are set by Chrome sync into
+// sync_driver::prefs::kEnhancedBookmarksExperimentEnabled user preference and
+// used for UMA reporting as well.
enum BookmarksExperimentState {
kNoBookmarksExperiment,
kBookmarksExperimentEnabled,
- kBookmarksExperimentEnabledUserOptOut
+ kBookmarksExperimentEnabledUserOptOut,
+ kBookmarksExperimentEnabledFromFinch,
+ kBookmarksExperimentOptOutFromFinch,
+ kBookmarksExperimentEnabledFromFinchUserSignedIn,
+ kBookmarksExperimentEnumSize
};
+// Returns true and sets |extension_id| if bookmarks experiment enabled
+// false if no bookmark experiment or extension id is empty.
+bool GetBookmarksExperimentExtensionID(const PrefService* user_prefs,
+ std::string* extension_id);
+
+// Updates bookmark experiment state based on information from Chrome sync
+// and Finch experiments.
+void UpdateBookmarksExperimentState(const PrefService* user_prefs,
+ PrefService* local_state,
+ bool user_signed_in);
+
// Sets flag to opt-in user into Finch experiment.
-void UpdateBookmarksExperiment(
+void ForceFinchBookmarkExperimentIfNeeded(
PrefService* local_state,
BookmarksExperimentState bookmarks_experiment_state);
// Returns true if enhanced bookmarks experiment is enabled.
+// Experiment could be enable from Chrome sync or from Finch.
bool IsEnhancedBookmarksExperimentEnabled();
// Returns true when flag enable-dom-distiller is set or enabled from Finch.
@@ -31,7 +50,4 @@ bool IsEnableDomDistillerSet();
// Returns true when flag enable-sync-articles is set or enabled from Finch.
bool IsEnableSyncArticlesSet();
-// Get extension id from Finch EnhancedBookmarks group parameters.
-std::string GetEnhancedBookmarksExtensionIdFromFinch();
-
#endif // CHROME_BROWSER_BOOKMARKS_ENHANCED_BOOKMARKS_FEATURES_H_
« no previous file with comments | « no previous file | chrome/browser/bookmarks/enhanced_bookmarks_features.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698