| 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" |
| 11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
| 12 #include "base/i18n/string_compare.h" | 12 #include "base/i18n/string_compare.h" |
| 13 #include "base/sequenced_task_runner.h" | 13 #include "base/sequenced_task_runner.h" |
| 14 #include "chrome/browser/bookmarks/bookmark_expanded_state_tracker.h" | 14 #include "chrome/browser/bookmarks/bookmark_expanded_state_tracker.h" |
| 15 #include "chrome/browser/bookmarks/bookmark_index.h" | 15 #include "chrome/browser/bookmarks/bookmark_index.h" |
| 16 #include "chrome/browser/bookmarks/bookmark_model_observer.h" | 16 #include "chrome/browser/bookmarks/bookmark_model_observer.h" |
| 17 #include "chrome/browser/bookmarks/bookmark_storage.h" | 17 #include "chrome/browser/bookmarks/bookmark_storage.h" |
| 18 #include "chrome/browser/bookmarks/bookmark_utils.h" | 18 #include "chrome/browser/bookmarks/bookmark_utils.h" |
| 19 #include "chrome/browser/chrome_notification_types.h" | 19 #include "chrome/browser/chrome_notification_types.h" |
| 20 #include "chrome/browser/favicon/favicon_changed_details.h" | 20 #include "chrome/browser/favicon/favicon_changed_details.h" |
| 21 #include "chrome/browser/favicon/favicon_service.h" | 21 #include "chrome/browser/favicon/favicon_service.h" |
| 22 #include "chrome/browser/favicon/favicon_service_factory.h" | 22 #include "chrome/browser/favicon/favicon_service_factory.h" |
| 23 #include "chrome/browser/history/history_service.h" | 23 #include "chrome/browser/history/history_service.h" |
| 24 #include "chrome/browser/history/history_service_factory.h" | 24 #include "chrome/browser/history/history_service_factory.h" |
| 25 #include "chrome/browser/profiles/profile.h" | 25 #include "chrome/browser/profiles/profile.h" |
| 26 #include "components/bookmarks/core/browser/bookmark_title_match.h" | 26 #include "components/bookmarks/core/browser/bookmark_title_match.h" |
| 27 #include "components/favicon_base/favicon_types.h" | 27 #include "components/favicon_base/favicon_types.h" |
| 28 #include "content/public/browser/notification_details.h" | 28 #include "content/public/browser/notification_details.h" |
| 29 #include "content/public/browser/notification_source.h" | 29 #include "content/public/browser/notification_source.h" |
| 30 #include "grit/generated_resources.h" | 30 #include "grit/component_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 #include "ui/gfx/image/image_util.h" | 33 #include "ui/gfx/image/image_util.h" |
| 34 | 34 |
| 35 using base::Time; | 35 using base::Time; |
| 36 | 36 |
| 37 namespace { | 37 namespace { |
| 38 | 38 |
| 39 // Helper to get a mutable bookmark node. | 39 // Helper to get a mutable bookmark node. |
| 40 BookmarkNode* AsMutable(const BookmarkNode* node) { | 40 BookmarkNode* AsMutable(const BookmarkNode* node) { |
| (...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 BookmarkPermanentNode* bb_node = | 960 BookmarkPermanentNode* bb_node = |
| 961 CreatePermanentNode(BookmarkNode::BOOKMARK_BAR); | 961 CreatePermanentNode(BookmarkNode::BOOKMARK_BAR); |
| 962 BookmarkPermanentNode* other_node = | 962 BookmarkPermanentNode* other_node = |
| 963 CreatePermanentNode(BookmarkNode::OTHER_NODE); | 963 CreatePermanentNode(BookmarkNode::OTHER_NODE); |
| 964 BookmarkPermanentNode* mobile_node = | 964 BookmarkPermanentNode* mobile_node = |
| 965 CreatePermanentNode(BookmarkNode::MOBILE); | 965 CreatePermanentNode(BookmarkNode::MOBILE); |
| 966 return new BookmarkLoadDetails(bb_node, other_node, mobile_node, | 966 return new BookmarkLoadDetails(bb_node, other_node, mobile_node, |
| 967 new BookmarkIndex(profile_), | 967 new BookmarkIndex(profile_), |
| 968 next_node_id_); | 968 next_node_id_); |
| 969 } | 969 } |
| OLD | NEW |