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 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
887 const history::FaviconImageResult& image_result) { | 887 const history::FaviconImageResult& image_result) { |
888 BookmarkNode* node = | 888 BookmarkNode* node = |
889 load_consumer_.GetClientData( | 889 load_consumer_.GetClientData( |
890 FaviconServiceFactory::GetForProfile( | 890 FaviconServiceFactory::GetForProfile( |
891 profile_, Profile::EXPLICIT_ACCESS), handle); | 891 profile_, Profile::EXPLICIT_ACCESS), handle); |
892 DCHECK(node); | 892 DCHECK(node); |
893 node->set_favicon_load_handle(0); | 893 node->set_favicon_load_handle(0); |
894 node->set_favicon_state(BookmarkNode::LOADED_FAVICON); | 894 node->set_favicon_state(BookmarkNode::LOADED_FAVICON); |
895 if (!image_result.image.IsEmpty()) { | 895 if (!image_result.image.IsEmpty()) { |
896 node->set_favicon(image_result.image); | 896 node->set_favicon(image_result.image); |
897 node->set_icon_url(image_result.icon_url); | |
Nicolas Zea
2012/11/27 18:56:09
similar to my other comment, is there a possibilit
| |
897 FaviconLoaded(node); | 898 FaviconLoaded(node); |
898 } | 899 } |
899 } | 900 } |
900 | 901 |
901 void BookmarkModel::LoadFavicon(BookmarkNode* node) { | 902 void BookmarkModel::LoadFavicon(BookmarkNode* node) { |
902 if (node->is_folder()) | 903 if (node->is_folder()) |
903 return; | 904 return; |
904 | 905 |
905 DCHECK(node->url().is_valid()); | 906 DCHECK(node->url().is_valid()); |
906 FaviconService* favicon_service = FaviconServiceFactory::GetForProfile( | 907 FaviconService* favicon_service = FaviconServiceFactory::GetForProfile( |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
977 BookmarkPermanentNode* bb_node = | 978 BookmarkPermanentNode* bb_node = |
978 CreatePermanentNode(BookmarkNode::BOOKMARK_BAR); | 979 CreatePermanentNode(BookmarkNode::BOOKMARK_BAR); |
979 BookmarkPermanentNode* other_node = | 980 BookmarkPermanentNode* other_node = |
980 CreatePermanentNode(BookmarkNode::OTHER_NODE); | 981 CreatePermanentNode(BookmarkNode::OTHER_NODE); |
981 BookmarkPermanentNode* mobile_node = | 982 BookmarkPermanentNode* mobile_node = |
982 CreatePermanentNode(BookmarkNode::MOBILE); | 983 CreatePermanentNode(BookmarkNode::MOBILE); |
983 return new BookmarkLoadDetails(bb_node, other_node, mobile_node, | 984 return new BookmarkLoadDetails(bb_node, other_node, mobile_node, |
984 new BookmarkIndex(profile_), | 985 new BookmarkIndex(profile_), |
985 next_node_id_); | 986 next_node_id_); |
986 } | 987 } |
OLD | NEW |