| 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 namespace about_flags { |
| 13 class FlagsStorage; |
| 14 } // namespace about_flags |
| 15 |
| 12 class PrefService; | 16 class PrefService; |
| 13 class Profile; | 17 class Profile; |
| 14 | 18 |
| 15 // States for bookmark experiment. They are set by Chrome sync into | 19 // States for bookmark experiment. They are set by Chrome sync into |
| 16 // sync_driver::prefs::kEnhancedBookmarksExperimentEnabled user preference and | 20 // sync_driver::prefs::kEnhancedBookmarksExperimentEnabled user preference and |
| 17 // used for UMA reporting as well. | 21 // used for UMA reporting as well. |
| 18 enum BookmarksExperimentState { | 22 enum BookmarksExperimentState { |
| 19 BOOKMARKS_EXPERIMENT_NONE, | 23 BOOKMARKS_EXPERIMENT_NONE, |
| 20 BOOKMARKS_EXPERIMENT_ENABLED, | 24 BOOKMARKS_EXPERIMENT_ENABLED, |
| 21 BOOKMARKS_EXPERIMENT_ENABLED_USER_OPT_OUT, | 25 BOOKMARKS_EXPERIMENT_ENABLED_USER_OPT_OUT, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 47 | 51 |
| 48 // Sets flag to opt-in user into Finch experiment. | 52 // Sets flag to opt-in user into Finch experiment. |
| 49 void ForceFinchBookmarkExperimentIfNeeded( | 53 void ForceFinchBookmarkExperimentIfNeeded( |
| 50 PrefService* local_state, | 54 PrefService* local_state, |
| 51 BookmarksExperimentState bookmarks_experiment_state); | 55 BookmarksExperimentState bookmarks_experiment_state); |
| 52 | 56 |
| 53 // Returns true if enhanced bookmarks experiment is running. | 57 // Returns true if enhanced bookmarks experiment is running. |
| 54 // Experiment could run by Chrome sync or by Finch. | 58 // Experiment could run by Chrome sync or by Finch. |
| 55 // Note that this doesn't necessarily mean that enhanced bookmarks | 59 // Note that this doesn't necessarily mean that enhanced bookmarks |
| 56 // is enabled, e.g., user can opt out using a flag. | 60 // is enabled, e.g., user can opt out using a flag. |
| 57 bool IsEnhancedBookmarksExperimentEnabled(); | 61 bool IsEnhancedBookmarksExperimentEnabled( |
| 62 about_flags::FlagsStorage* flags_storage); |
| 58 | 63 |
| 59 #if defined(OS_ANDROID) | 64 #if defined(OS_ANDROID) |
| 60 // Returns true if enhanced bookmark salient image prefetching is enabled. | 65 // Returns true if enhanced bookmark salient image prefetching is enabled. |
| 61 // This can be controlled by field trial. | 66 // This can be controlled by field trial. |
| 62 bool IsEnhancedBookmarkImageFetchingEnabled(const PrefService* user_prefs); | 67 bool IsEnhancedBookmarkImageFetchingEnabled(const PrefService* user_prefs); |
| 63 | 68 |
| 64 // Returns true if enhanced bookmarks is enabled. | 69 // Returns true if enhanced bookmarks is enabled. |
| 65 bool IsEnhancedBookmarksEnabled(const PrefService* user_prefs); | 70 bool IsEnhancedBookmarksEnabled(const PrefService* user_prefs); |
| 66 | 71 |
| 67 #endif | 72 #endif |
| 68 | 73 |
| 69 // Returns true when flag enable-dom-distiller is set or enabled from Finch. | 74 // Returns true when flag enable-dom-distiller is set or enabled from Finch. |
| 70 bool IsEnableDomDistillerSet(); | 75 bool IsEnableDomDistillerSet(); |
| 71 | 76 |
| 72 // Returns true when flag enable-sync-articles is set or enabled from Finch. | 77 // Returns true when flag enable-sync-articles is set or enabled from Finch. |
| 73 bool IsEnableSyncArticlesSet(); | 78 bool IsEnableSyncArticlesSet(); |
| 74 | 79 |
| 75 #endif // CHROME_BROWSER_BOOKMARKS_ENHANCED_BOOKMARKS_FEATURES_H_ | 80 #endif // CHROME_BROWSER_BOOKMARKS_ENHANCED_BOOKMARKS_FEATURES_H_ |
| OLD | NEW |