| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/bookmarks/browser/bookmark_model.h" | 5 #include "components/bookmarks/browser/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 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 removed_urls->erase(i++); | 871 removed_urls->erase(i++); |
| 872 } else { | 872 } else { |
| 873 ++i; | 873 ++i; |
| 874 } | 874 } |
| 875 } | 875 } |
| 876 } | 876 } |
| 877 | 877 |
| 878 BookmarkNode* BookmarkModel::AddNode(BookmarkNode* parent, | 878 BookmarkNode* BookmarkModel::AddNode(BookmarkNode* parent, |
| 879 int index, | 879 int index, |
| 880 BookmarkNode* node) { | 880 BookmarkNode* node) { |
| 881 FOR_EACH_OBSERVER(BookmarkModelObserver, observers_, | |
| 882 OnWillAddBookmarkNode(this, node)); | |
| 883 | |
| 884 parent->Add(node, index); | 881 parent->Add(node, index); |
| 885 | 882 |
| 886 if (store_.get()) | 883 if (store_.get()) |
| 887 store_->ScheduleSave(); | 884 store_->ScheduleSave(); |
| 888 | 885 |
| 889 FOR_EACH_OBSERVER(BookmarkModelObserver, observers_, | 886 FOR_EACH_OBSERVER(BookmarkModelObserver, observers_, |
| 890 BookmarkNodeAdded(this, parent, index)); | 887 BookmarkNodeAdded(this, parent, index)); |
| 891 | 888 |
| 892 index_->Add(node); | 889 index_->Add(node); |
| 893 | 890 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1007 BookmarkPermanentNode* mobile_node = | 1004 BookmarkPermanentNode* mobile_node = |
| 1008 CreatePermanentNode(BookmarkNode::MOBILE); | 1005 CreatePermanentNode(BookmarkNode::MOBILE); |
| 1009 return scoped_ptr<BookmarkLoadDetails>(new BookmarkLoadDetails( | 1006 return scoped_ptr<BookmarkLoadDetails>(new BookmarkLoadDetails( |
| 1010 bb_node, | 1007 bb_node, |
| 1011 other_node, | 1008 other_node, |
| 1012 mobile_node, | 1009 mobile_node, |
| 1013 client_->GetLoadExtraNodesCallback(), | 1010 client_->GetLoadExtraNodesCallback(), |
| 1014 new BookmarkIndex(client_, accept_languages), | 1011 new BookmarkIndex(client_, accept_languages), |
| 1015 next_node_id_)); | 1012 next_node_id_)); |
| 1016 } | 1013 } |
| OLD | NEW |