Index: chrome/browser/extensions/api/bookmarks/bookmarks_api.cc |
diff --git a/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc b/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc |
index 59c0c2cfb05fd2e5f02f605e3941294950573289..4160332d860ab5481f1b67bb75e129c602637ab6 100644 |
--- a/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc |
+++ b/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc |
@@ -180,17 +180,16 @@ const BookmarkNode* BookmarksFunction::CreateBookmarkNode( |
} |
const BookmarkNode* node; |
- if (url_string.length()) |
+ if (url_string.length()) { |
node = model->AddURLWithCreationTimeAndMetaInfo( |
parent, index, title, url, base::Time::Now(), meta_info); |
- else |
+ } else { |
node = model->AddFolderWithMetaInfo(parent, index, title, meta_info); |
- DCHECK(node); |
- if (!node) { |
- error_ = keys::kNoNodeError; |
- return NULL; |
+ model->SetDateFolderModified(parent, base::Time::Now()); |
} |
+ DCHECK(node); |
+ |
return node; |
} |