| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |