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

Unified Diff: chrome/browser/importer/profile_writer.cc

Issue 7003039: ui/base/models: Add empty() accessor to TreeNode class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sky review Created 9 years, 6 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/importer/profile_writer.cc
diff --git a/chrome/browser/importer/profile_writer.cc b/chrome/browser/importer/profile_writer.cc
index f0f7841bd8047b7b5abd4c3de5067ceca1531096..9b6b08519b93a771df70da242e38452b9e6e0b6f 100644
--- a/chrome/browser/importer/profile_writer.cc
+++ b/chrome/browser/importer/profile_writer.cc
@@ -123,7 +123,7 @@ void ProfileWriter::AddBookmarks(const std::vector<BookmarkEntry>& bookmarks,
// If the bookmark bar is currently empty, we should import directly to it.
// Otherwise, we should import everything to a subfolder.
const BookmarkNode* bookmark_bar = model->GetBookmarkBarNode();
- bool import_to_top_level = bookmark_bar->child_count() == 0;
+ bool import_to_top_level = bookmark_bar->empty();
// If the user currently has no bookmarks in the bookmark bar, make sure that
// at least some of the imported bookmarks end up there. Otherwise, we'll end
« no previous file with comments | « chrome/browser/extensions/extension_bookmark_helpers.cc ('k') | chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698