Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: chrome/browser/bookmarks/bookmark_model.cc

Issue 56143002: Make FaviconService() use Porfile as parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit test but break the DEPS Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 void BookmarkModel::LoadFavicon(BookmarkNode* node) { 989 void BookmarkModel::LoadFavicon(BookmarkNode* node) {
990 if (node->is_folder()) 990 if (node->is_folder())
991 return; 991 return;
992 992
993 DCHECK(node->url().is_valid()); 993 DCHECK(node->url().is_valid());
994 FaviconService* favicon_service = FaviconServiceFactory::GetForProfile( 994 FaviconService* favicon_service = FaviconServiceFactory::GetForProfile(
995 profile_, Profile::EXPLICIT_ACCESS); 995 profile_, Profile::EXPLICIT_ACCESS);
996 if (!favicon_service) 996 if (!favicon_service)
997 return; 997 return;
998 FaviconService::Handle handle = favicon_service->GetFaviconImageForURL( 998 FaviconService::Handle handle = favicon_service->GetFaviconImageForURL(
999 FaviconService::FaviconForURLParams(profile_, 999 FaviconService::FaviconForURLParams(node->url(),
1000 node->url(),
1001 chrome::FAVICON, 1000 chrome::FAVICON,
1002 gfx::kFaviconSize), 1001 gfx::kFaviconSize),
1003 base::Bind(&BookmarkModel::OnFaviconDataAvailable, 1002 base::Bind(&BookmarkModel::OnFaviconDataAvailable,
1004 base::Unretained(this), node), 1003 base::Unretained(this), node),
1005 &cancelable_task_tracker_); 1004 &cancelable_task_tracker_);
1006 node->set_favicon_load_task_id(handle); 1005 node->set_favicon_load_task_id(handle);
1007 } 1006 }
1008 1007
1009 void BookmarkModel::FaviconLoaded(const BookmarkNode* node) { 1008 void BookmarkModel::FaviconLoaded(const BookmarkNode* node) {
1010 FOR_EACH_OBSERVER(BookmarkModelObserver, observers_, 1009 FOR_EACH_OBSERVER(BookmarkModelObserver, observers_,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 BookmarkPermanentNode* bb_node = 1063 BookmarkPermanentNode* bb_node =
1065 CreatePermanentNode(BookmarkNode::BOOKMARK_BAR); 1064 CreatePermanentNode(BookmarkNode::BOOKMARK_BAR);
1066 BookmarkPermanentNode* other_node = 1065 BookmarkPermanentNode* other_node =
1067 CreatePermanentNode(BookmarkNode::OTHER_NODE); 1066 CreatePermanentNode(BookmarkNode::OTHER_NODE);
1068 BookmarkPermanentNode* mobile_node = 1067 BookmarkPermanentNode* mobile_node =
1069 CreatePermanentNode(BookmarkNode::MOBILE); 1068 CreatePermanentNode(BookmarkNode::MOBILE);
1070 return new BookmarkLoadDetails(bb_node, other_node, mobile_node, 1069 return new BookmarkLoadDetails(bb_node, other_node, mobile_node,
1071 new BookmarkIndex(profile_), 1070 new BookmarkIndex(profile_),
1072 next_node_id_); 1071 next_node_id_);
1073 } 1072 }
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_html_writer.cc ('k') | chrome/browser/favicon/favicon_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698