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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // BookmarkModel -------------------------------------------------------------- | 93 // BookmarkModel -------------------------------------------------------------- |
94 | 94 |
95 BookmarkModel::BookmarkModel(BookmarkClient* client) | 95 BookmarkModel::BookmarkModel(BookmarkClient* client) |
96 : client_(client), | 96 : client_(client), |
97 loaded_(false), | 97 loaded_(false), |
98 root_(GURL()), | 98 root_(GURL()), |
99 bookmark_bar_node_(NULL), | 99 bookmark_bar_node_(NULL), |
100 other_node_(NULL), | 100 other_node_(NULL), |
101 mobile_node_(NULL), | 101 mobile_node_(NULL), |
102 next_node_id_(1), | 102 next_node_id_(1), |
103 observers_(ObserverList<BookmarkModelObserver>::NOTIFY_EXISTING_ONLY), | 103 observers_( |
| 104 base::ObserverList<BookmarkModelObserver>::NOTIFY_EXISTING_ONLY), |
104 loaded_signal_(true, false), | 105 loaded_signal_(true, false), |
105 extensive_changes_(0) { | 106 extensive_changes_(0) { |
106 DCHECK(client_); | 107 DCHECK(client_); |
107 } | 108 } |
108 | 109 |
109 BookmarkModel::~BookmarkModel() { | 110 BookmarkModel::~BookmarkModel() { |
110 FOR_EACH_OBSERVER(BookmarkModelObserver, observers_, | 111 FOR_EACH_OBSERVER(BookmarkModelObserver, observers_, |
111 BookmarkModelBeingDeleted(this)); | 112 BookmarkModelBeingDeleted(this)); |
112 | 113 |
113 if (store_.get()) { | 114 if (store_.get()) { |
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 return scoped_ptr<BookmarkLoadDetails>(new BookmarkLoadDetails( | 1030 return scoped_ptr<BookmarkLoadDetails>(new BookmarkLoadDetails( |
1030 bb_node, | 1031 bb_node, |
1031 other_node, | 1032 other_node, |
1032 mobile_node, | 1033 mobile_node, |
1033 client_->GetLoadExtraNodesCallback(), | 1034 client_->GetLoadExtraNodesCallback(), |
1034 new BookmarkIndex(client_, accept_languages), | 1035 new BookmarkIndex(client_, accept_languages), |
1035 next_node_id_)); | 1036 next_node_id_)); |
1036 } | 1037 } |
1037 | 1038 |
1038 } // namespace bookmarks | 1039 } // namespace bookmarks |
OLD | NEW |