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

Unified Diff: chrome/browser/extensions/api/bookmarks/bookmarks_api.cc

Issue 1101833002: Updating modification time of parent when a folder node is added in it in bookmark bar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698