Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_BOOKMARKS_ENHANCED_BOOKMARKS_FEATURES_H_ | 5 #ifndef CHROME_BROWSER_BOOKMARKS_ENHANCED_BOOKMARKS_FEATURES_H_ |
| 6 #define CHROME_BROWSER_BOOKMARKS_ENHANCED_BOOKMARKS_FEATURES_H_ | 6 #define CHROME_BROWSER_BOOKMARKS_ENHANCED_BOOKMARKS_FEATURES_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "extensions/common/extension.h" | 10 #include "extensions/common/extension.h" |
| 11 | 11 |
| 12 class PrefService; | 12 class PrefService; |
| 13 | 13 |
| 14 enum BookmarksExperimentState { | 14 enum BookmarksExperimentState { |
| 15 kNoBookmarksExperiment, | 15 kNoBookmarksExperiment, |
| 16 kBookmarksExperimentEnabled, | 16 kBookmarksExperimentEnabled, |
| 17 kBookmarksExperimentEnabledUserOptOut | 17 kBookmarksExperimentEnabledUserOptOut, |
| 18 kBookmarksExperimentEnabledFromFinch, | |
| 19 kBookmarksExperimentOptOutFromFinch, | |
| 20 kBookmarksExperimentEnabledFromFinchUserSignedIn, | |
| 21 kBookmarksExperimentEnumSize | |
| 18 }; | 22 }; |
| 19 | 23 |
| 24 bool IsBookmarksExperimentEnabled(PrefService* user_prefs, | |
| 25 std::string* extension_id); | |
|
not at google - send to devlin
2014/05/06 21:35:06
run git cl format on this cl before submitting
yefimt
2014/05/06 22:02:39
Done.
| |
| 26 | |
| 27 void UpdateBookmarksExperimentState(PrefService* user_prefs, | |
| 28 PrefService* local_state, bool user_signed_in); | |
| 29 | |
| 20 // Sets flag to opt-in user into Finch experiment. | 30 // Sets flag to opt-in user into Finch experiment. |
| 21 void UpdateBookmarksExperiment( | 31 void UpdateBookmarksExperiment( |
| 22 PrefService* local_state, | 32 PrefService* local_state, |
| 23 BookmarksExperimentState bookmarks_experiment_state); | 33 BookmarksExperimentState bookmarks_experiment_state); |
| 24 | 34 |
| 25 // Returns true if enhanced bookmarks experiment is enabled. | 35 // Returns true if enhanced bookmarks experiment is enabled. |
| 26 bool IsEnhancedBookmarksExperimentEnabled(); | 36 bool IsEnhancedBookmarksExperimentEnabled(); |
| 27 | 37 |
| 38 // Returns true if enhanced bookmarks experiment is enabled from Finch. | |
| 39 bool IsEnhancedBookmarksExperimentEnabledFromFinch(); | |
| 40 | |
| 28 // Returns true when flag enable-dom-distiller is set or enabled from Finch. | 41 // Returns true when flag enable-dom-distiller is set or enabled from Finch. |
| 29 bool IsEnableDomDistillerSet(); | 42 bool IsEnableDomDistillerSet(); |
| 30 | 43 |
| 31 // Returns true when flag enable-sync-articles is set or enabled from Finch. | 44 // Returns true when flag enable-sync-articles is set or enabled from Finch. |
| 32 bool IsEnableSyncArticlesSet(); | 45 bool IsEnableSyncArticlesSet(); |
| 33 | 46 |
| 34 // Get extension id from Finch EnhancedBookmarks group parameters. | 47 // Get extension id from Finch EnhancedBookmarks group parameters. |
| 35 std::string GetEnhancedBookmarksExtensionIdFromFinch(); | 48 std::string GetEnhancedBookmarksExtensionIdFromFinch(); |
| 36 | 49 |
| 37 #endif // CHROME_BROWSER_BOOKMARKS_ENHANCED_BOOKMARKS_FEATURES_H_ | 50 #endif // CHROME_BROWSER_BOOKMARKS_ENHANCED_BOOKMARKS_FEATURES_H_ |
| OLD | NEW |