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

Unified Diff: bookmarks/bookmark_storage.cc

Issue 342046: Fix for crash when a bookmark URL is an empty string ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/chrome/browser/
Patch Set: Created 11 years, 2 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 | « bookmarks/bookmark_codec.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bookmarks/bookmark_storage.cc
===================================================================
--- bookmarks/bookmark_storage.cc (revision 30528)
+++ bookmarks/bookmark_storage.cc (working copy)
@@ -81,7 +81,7 @@
scoped_ptr<Value> root(serializer.Deserialize(NULL));
if (root.get()) {
- // Building the index cane take a while, so we do it on the background
+ // Building the index can take a while, so we do it on the background
// thread.
int64 max_node_id = 0;
BookmarkCodec codec;
@@ -116,7 +116,8 @@
// Adds node to the model's index, recursing through all children as well.
void AddBookmarksToIndex(BookmarkNode* node) {
if (node->is_url()) {
- details_->index()->Add(node);
+ if (node->GetURL().is_valid())
+ details_->index()->Add(node);
} else {
for (int i = 0; i < node->GetChildCount(); ++i)
AddBookmarksToIndex(node->GetChild(i));
« no previous file with comments | « bookmarks/bookmark_codec.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698