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

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

Issue 6931018: Initial implementation of "Synced Bookmarks" folder. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merge Created 9 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 | « chrome/browser/bookmarks/bookmark_utils.cc ('k') | chrome/browser/extensions/extension_bookmark_helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/recently_used_folders_combo_model.cc
diff --git a/chrome/browser/bookmarks/recently_used_folders_combo_model.cc b/chrome/browser/bookmarks/recently_used_folders_combo_model.cc
index 3bc18e2fefbf1dd8ada83db076acfbd199e01da3..c625d2de5ee342eefdb615d31712926937b5f502 100644
--- a/chrome/browser/bookmarks/recently_used_folders_combo_model.cc
+++ b/chrome/browser/bookmarks/recently_used_folders_combo_model.cc
@@ -4,7 +4,9 @@
#include "chrome/browser/bookmarks/recently_used_folders_combo_model.h"
+#include "base/command_line.h"
#include "chrome/browser/bookmarks/bookmark_utils.h"
+#include "chrome/common/chrome_switches.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -26,11 +28,13 @@ RecentlyUsedFoldersComboModel::RecentlyUsedFoldersComboModel(
// We special case the placement of these, so remove them from the list, then
// fix up the order.
RemoveNode(model->GetBookmarkBarNode());
+ RemoveNode(model->synced_node());
RemoveNode(model->other_node());
RemoveNode(node->parent());
// Make the parent the first item, unless it's the bookmark bar or other node.
if (node->parent() != model->GetBookmarkBarNode() &&
+ node->parent() != model->synced_node() &&
node->parent() != model->other_node()) {
nodes_.insert(nodes_.begin(), node->parent());
}
@@ -42,6 +46,10 @@ RecentlyUsedFoldersComboModel::RecentlyUsedFoldersComboModel(
// And put the bookmark bar and other nodes at the end of the list.
nodes_.push_back(model->GetBookmarkBarNode());
nodes_.push_back(model->other_node());
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableSyncedBookmarksFolder)) {
+ nodes_.push_back(model->synced_node());
+ }
std::vector<const BookmarkNode*>::iterator it = std::find(nodes_.begin(),
nodes_.end(),
« no previous file with comments | « chrome/browser/bookmarks/bookmark_utils.cc ('k') | chrome/browser/extensions/extension_bookmark_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698