Index: components/enhanced_bookmarks/enhanced_bookmark_utils.h |
diff --git a/components/enhanced_bookmarks/enhanced_bookmark_utils.h b/components/enhanced_bookmarks/enhanced_bookmark_utils.h |
index c66fa9adf8c07b69bc46c0f791ce27784559797b..81476eb4a4f385dc8b3dde056cd2f9acefa3c3f4 100644 |
--- a/components/enhanced_bookmarks/enhanced_bookmark_utils.h |
+++ b/components/enhanced_bookmarks/enhanced_bookmark_utils.h |
@@ -16,6 +16,8 @@ class BookmarkNode; |
namespace enhanced_bookmarks { |
+extern const char kFieldTrialName[]; |
+ |
// Possible locations where a bookmark can be opened from. |
// Please sync with the corresponding histograms.xml. |
// |
@@ -31,6 +33,16 @@ enum LaunchLocation { |
COUNT = 6, |
}; |
+// View modes of enhanced bookmarks' main items UI. |
+// |
+// A Java counterpart will be generated for this enum. |
+// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.enhanced_bookmarks |
+enum ViewMode { |
+ DEFAULT = 0, |
+ LIST = 1, |
+ GRID = 2, |
+}; |
+ |
// Returns the permanent nodes whose url children are considered uncategorized |
// and whose folder children should be shown in the bookmark menu. |
// |model| must be loaded. |
@@ -54,6 +66,11 @@ const bookmarks::BookmarkNode* RootLevelFolderForNode( |
const bookmarks::BookmarkNode* node, |
bookmarks::BookmarkModel* model); |
+// Returns the default view mode for main items UI. |
+// The default is controlled by a finch experiment. If finch is not available or |
+// has an invalid value, it returns a hard coded default view mode. |
+ViewMode GetDefaultViewMode(); |
+ |
} // namespace enhanced_bookmarks |
#endif // COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_UTILS_H_ |