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 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/i18n/string_compare.h" | 13 #include "base/i18n/string_compare.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/memory/ptr_util.h" | 16 #include "base/memory/ptr_util.h" |
17 #include "base/metrics/histogram_macros.h" | 17 #include "base/metrics/histogram_macros.h" |
18 #include "base/profiler/scoped_tracker.h" | 18 #include "base/profiler/scoped_tracker.h" |
19 #include "base/strings/string_util.h" | 19 #include "base/strings/string_util.h" |
20 #include "components/bookmarks/browser/bookmark_expanded_state_tracker.h" | 20 #include "components/bookmarks/browser/bookmark_expanded_state_tracker.h" |
21 #include "components/bookmarks/browser/bookmark_model_observer.h" | 21 #include "components/bookmarks/browser/bookmark_model_observer.h" |
22 #include "components/bookmarks/browser/bookmark_node_data.h" | 22 #include "components/bookmarks/browser/bookmark_node_data.h" |
23 #include "components/bookmarks/browser/bookmark_storage.h" | 23 #include "components/bookmarks/browser/bookmark_storage.h" |
24 #include "components/bookmarks/browser/bookmark_undo_delegate.h" | 24 #include "components/bookmarks/browser/bookmark_undo_delegate.h" |
25 #include "components/bookmarks/browser/bookmark_utils.h" | 25 #include "components/bookmarks/browser/bookmark_utils.h" |
26 #include "components/bookmarks/browser/titled_url_index.h" | 26 #include "components/bookmarks/browser/titled_url_index.h" |
27 #include "components/bookmarks/browser/titled_url_match.h" | 27 #include "components/bookmarks/browser/titled_url_match.h" |
28 #include "components/bookmarks/browser/typed_count_sorter.h" | 28 #include "components/bookmarks/browser/typed_count_sorter.h" |
29 #include "components/favicon_base/favicon_types.h" | 29 #include "components/favicon_base/favicon_types.h" |
30 #include "grit/components_strings.h" | 30 #include "components/strings/grit/components_strings.h" |
31 #include "ui/base/l10n/l10n_util.h" | 31 #include "ui/base/l10n/l10n_util.h" |
32 #include "ui/gfx/favicon_size.h" | 32 #include "ui/gfx/favicon_size.h" |
33 | 33 |
34 using base::Time; | 34 using base::Time; |
35 | 35 |
36 namespace bookmarks { | 36 namespace bookmarks { |
37 | 37 |
38 namespace { | 38 namespace { |
39 | 39 |
40 // Helper to get a mutable bookmark node. | 40 // Helper to get a mutable bookmark node. |
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 undo_delegate_ = undo_delegate; | 1123 undo_delegate_ = undo_delegate; |
1124 if (undo_delegate_) | 1124 if (undo_delegate_) |
1125 undo_delegate_->SetUndoProvider(this); | 1125 undo_delegate_->SetUndoProvider(this); |
1126 } | 1126 } |
1127 | 1127 |
1128 BookmarkUndoDelegate* BookmarkModel::undo_delegate() const { | 1128 BookmarkUndoDelegate* BookmarkModel::undo_delegate() const { |
1129 return undo_delegate_ ? undo_delegate_ : empty_undo_delegate_.get(); | 1129 return undo_delegate_ ? undo_delegate_ : empty_undo_delegate_.get(); |
1130 } | 1130 } |
1131 | 1131 |
1132 } // namespace bookmarks | 1132 } // namespace bookmarks |
OLD | NEW |