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

Unified Diff: chrome/browser/bookmarks/chrome_bookmark_client.cc

Issue 265853002: Allow embedder to force visibility of permanent nodes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase & fix BookmarkModelTest.NodeVisibility 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
Index: chrome/browser/bookmarks/chrome_bookmark_client.cc
diff --git a/chrome/browser/bookmarks/chrome_bookmark_client.cc b/chrome/browser/bookmarks/chrome_bookmark_client.cc
index ec50ffa31abf42293456db14986214da5eb1dfa7..339e46522fc7f382bd8968fd3365f4ee99516923 100644
--- a/chrome/browser/bookmarks/chrome_bookmark_client.cc
+++ b/chrome/browser/bookmarks/chrome_bookmark_client.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/bookmarks/chrome_bookmark_client.h"
+#include "base/logging.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/favicon/favicon_changed_details.h"
#include "chrome/browser/favicon/favicon_service.h"
@@ -13,6 +14,7 @@
#include "chrome/browser/history/url_database.h"
#include "chrome/browser/profiles/profile.h"
#include "components/bookmarks/core/browser/bookmark_model.h"
+#include "components/bookmarks/core/browser/bookmark_node.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/user_metrics.h"
@@ -101,6 +103,17 @@ void ChromeBookmarkClient::RecordAction(const base::UserMetricsAction& action) {
content::RecordAction(action);
}
+bool ChromeBookmarkClient::IsPermanentNodeVisible(int node_type) {
+ DCHECK(node_type == BookmarkNode::BOOKMARK_BAR ||
+ node_type == BookmarkNode::OTHER_NODE ||
+ node_type == BookmarkNode::MOBILE);
+#if !defined(OS_IOS)
+ return node_type != BookmarkNode::MOBILE;
+#else
+ return node_type == BookmarkNode::MOBILE;
+#endif
+}
+
void ChromeBookmarkClient::Observe(
int type,
const content::NotificationSource& source,
« no previous file with comments | « chrome/browser/bookmarks/chrome_bookmark_client.h ('k') | chrome/browser/sync/glue/bookmark_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698