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

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: 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 da6397683ce8ef3c37c5c4d9e37892e019f254e5..fb194429a104a4111c8c154188e14fa454e68513 100644
--- a/chrome/browser/importer/profile_writer.cc
+++ b/chrome/browser/importer/profile_writer.cc
@@ -122,7 +122,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

Powered by Google App Engine
This is Rietveld 408576698