diff options
-rw-r--r-- | chrome/browser/bookmarks/bookmark_model.cc | 18 | ||||
-rw-r--r-- | chrome/browser/bookmarks/bookmark_model.h | 6 | ||||
-rw-r--r-- | chrome/browser/bookmarks/bookmark_utils.cc | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/chrome/browser/bookmarks/bookmark_model.cc b/chrome/browser/bookmarks/bookmark_model.cc index f75577c..a4e17dc 100644 --- a/chrome/browser/bookmarks/bookmark_model.cc +++ b/chrome/browser/bookmarks/bookmark_model.cc @@ -389,6 +389,15 @@ void BookmarkModel::SetURLStarred(const GURL& url, } } +void BookmarkModel::SetDateGroupModified(const BookmarkNode* parent, + const Time time) { + DCHECK(parent); + AsMutable(parent)->set_date_group_modified(time); + + if (store_.get()) + store_->ScheduleSave(); +} + void BookmarkModel::ResetDateGroupModified(const BookmarkNode* node) { SetDateGroupModified(node, Time()); } @@ -603,15 +612,6 @@ bool BookmarkModel::IsValidIndex(const BookmarkNode* parent, (allow_end && index == parent->GetChildCount())))); } -void BookmarkModel::SetDateGroupModified(const BookmarkNode* parent, - const Time time) { - DCHECK(parent); - AsMutable(parent)->set_date_group_modified(time); - - if (store_.get()) - store_->ScheduleSave(); -} - BookmarkNode* BookmarkModel::CreateBookmarkNode() { history::StarredEntry entry; entry.type = history::StarredEntry::BOOKMARK_BAR; diff --git a/chrome/browser/bookmarks/bookmark_model.h b/chrome/browser/bookmarks/bookmark_model.h index 5d03af7..ba66791 100644 --- a/chrome/browser/bookmarks/bookmark_model.h +++ b/chrome/browser/bookmarks/bookmark_model.h @@ -274,6 +274,9 @@ class BookmarkModel : public NotificationObserver, public BookmarkService { const std::wstring& title, bool is_starred); + // Sets the date modified time of the specified node. + void SetDateGroupModified(const BookmarkNode* parent, const base::Time time); + // Resets the 'date modified' time of the node to 0. This is used during // importing to exclude the newly created groups from showing up in the // combobox of most recently modified groups. @@ -356,9 +359,6 @@ class BookmarkModel : public NotificationObserver, public BookmarkService { // Returns true if the parent and index are valid. bool IsValidIndex(const BookmarkNode* parent, int index, bool allow_end); - // Sets the date modified time of the specified node. - void SetDateGroupModified(const BookmarkNode* parent, const base::Time time); - // Creates the bookmark bar/other nodes. These call into // CreateRootNodeFromStarredEntry. BookmarkNode* CreateBookmarkNode(); diff --git a/chrome/browser/bookmarks/bookmark_utils.cc b/chrome/browser/bookmarks/bookmark_utils.cc index e62a30a..b682c2b 100644 --- a/chrome/browser/bookmarks/bookmark_utils.cc +++ b/chrome/browser/bookmarks/bookmark_utils.cc @@ -519,7 +519,7 @@ static const BookmarkNode* CreateNewNode(BookmarkModel* model, model->AddURL(node, node->GetChildCount(), details.urls[i].second, details.urls[i].first); } - // TODO(sky): update parent modified time. + model->SetDateGroupModified(parent, Time::Now()); } else { NOTREACHED(); return NULL; |