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

Side by Side Diff: chrome/browser/bookmarks/bookmark_model.cc

Issue 22855011: Added date_added and folder_modification_time to BookmarkNodeData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix clang and android compile errors. Created 7 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_node_data.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/bookmarks/bookmark_model.h" 5 #include "chrome/browser/bookmarks/bookmark_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 // Can't make an ancestor of the node be a child of the node. 397 // Can't make an ancestor of the node be a child of the node.
398 NOTREACHED(); 398 NOTREACHED();
399 return; 399 return;
400 } 400 }
401 401
402 SetDateFolderModified(new_parent, Time::Now()); 402 SetDateFolderModified(new_parent, Time::Now());
403 BookmarkNodeData drag_data(node); 403 BookmarkNodeData drag_data(node);
404 std::vector<BookmarkNodeData::Element> elements(drag_data.elements); 404 std::vector<BookmarkNodeData::Element> elements(drag_data.elements);
405 // CloneBookmarkNode will use BookmarkModel methods to do the job, so we 405 // CloneBookmarkNode will use BookmarkModel methods to do the job, so we
406 // don't need to send notifications here. 406 // don't need to send notifications here.
407 bookmark_utils::CloneBookmarkNode(this, elements, new_parent, index); 407 bookmark_utils::CloneBookmarkNode(this, elements, new_parent, index, true);
408 408
409 if (store_.get()) 409 if (store_.get())
410 store_->ScheduleSave(); 410 store_->ScheduleSave();
411 } 411 }
412 412
413 const gfx::Image& BookmarkModel::GetFavicon(const BookmarkNode* node) { 413 const gfx::Image& BookmarkModel::GetFavicon(const BookmarkNode* node) {
414 DCHECK(node); 414 DCHECK(node);
415 if (node->favicon_state() == BookmarkNode::INVALID_FAVICON) { 415 if (node->favicon_state() == BookmarkNode::INVALID_FAVICON) {
416 BookmarkNode* mutable_node = AsMutable(node); 416 BookmarkNode* mutable_node = AsMutable(node);
417 mutable_node->set_favicon_state(BookmarkNode::LOADING_FAVICON); 417 mutable_node->set_favicon_state(BookmarkNode::LOADING_FAVICON);
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 BookmarkPermanentNode* bb_node = 1049 BookmarkPermanentNode* bb_node =
1050 CreatePermanentNode(BookmarkNode::BOOKMARK_BAR); 1050 CreatePermanentNode(BookmarkNode::BOOKMARK_BAR);
1051 BookmarkPermanentNode* other_node = 1051 BookmarkPermanentNode* other_node =
1052 CreatePermanentNode(BookmarkNode::OTHER_NODE); 1052 CreatePermanentNode(BookmarkNode::OTHER_NODE);
1053 BookmarkPermanentNode* mobile_node = 1053 BookmarkPermanentNode* mobile_node =
1054 CreatePermanentNode(BookmarkNode::MOBILE); 1054 CreatePermanentNode(BookmarkNode::MOBILE);
1055 return new BookmarkLoadDetails(bb_node, other_node, mobile_node, 1055 return new BookmarkLoadDetails(bb_node, other_node, mobile_node,
1056 new BookmarkIndex(profile_), 1056 new BookmarkIndex(profile_),
1057 next_node_id_); 1057 next_node_id_);
1058 } 1058 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_node_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698