| Index: components/favicon/content/content_favicon_driver.cc
|
| diff --git a/components/favicon/content/content_favicon_driver.cc b/components/favicon/content/content_favicon_driver.cc
|
| index a6e5259847c538dd0a7497d8d52f3c70eef1a88a..5388b54c737bfa918d3b9dcf7a555972f87af702 100644
|
| --- a/components/favicon/content/content_favicon_driver.cc
|
| +++ b/components/favicon/content/content_favicon_driver.cc
|
| @@ -32,8 +32,8 @@ void ContentFaviconDriver::CreateForWebContents(
|
| return;
|
|
|
| web_contents->SetUserData(
|
| - UserDataKey(), new ContentFaviconDriver(web_contents, favicon_service,
|
| - history_service, bookmark_model));
|
| + UserDataKey(),
|
| + new ContentFaviconDriver(web_contents, favicon_service, history_service));
|
| }
|
|
|
| void ContentFaviconDriver::SaveFavicon() {
|
| @@ -88,7 +88,9 @@ bool ContentFaviconDriver::FaviconIsValid() const {
|
| return false;
|
| }
|
|
|
| -int ContentFaviconDriver::StartDownload(const GURL& url, int max_image_size) {
|
| +int ContentFaviconDriver::DownloadImage(const GURL& url,
|
| + int max_image_size,
|
| + ImageDownloadCallback callback) {
|
| if (WasUnableToDownloadFavicon(url)) {
|
| DVLOG(1) << "Skip Failed FavIcon: " << url;
|
| return 0;
|
| @@ -97,10 +99,8 @@ int ContentFaviconDriver::StartDownload(const GURL& url, int max_image_size) {
|
| bool bypass_cache = (bypass_cache_page_url_ == GetActiveURL());
|
| bypass_cache_page_url_ = GURL();
|
|
|
| - return web_contents()->DownloadImage(
|
| - url, true, max_image_size, bypass_cache,
|
| - base::Bind(&FaviconDriverImpl::DidDownloadFavicon,
|
| - base::Unretained(this)));
|
| + return web_contents()->DownloadImage(url, true, max_image_size, bypass_cache,
|
| + callback);
|
| }
|
|
|
| bool ContentFaviconDriver::IsOffTheRecord() {
|
| @@ -117,11 +117,9 @@ GURL ContentFaviconDriver::GetActiveURL() {
|
| ContentFaviconDriver::ContentFaviconDriver(
|
| content::WebContents* web_contents,
|
| FaviconService* favicon_service,
|
| - history::HistoryService* history_service,
|
| - bookmarks::BookmarkModel* bookmark_model)
|
| + history::HistoryService* history_service)
|
| : content::WebContentsObserver(web_contents),
|
| - FaviconDriverImpl(favicon_service, history_service, bookmark_model) {
|
| -}
|
| + FaviconDriverImpl(favicon_service, history_service, this) {}
|
|
|
| ContentFaviconDriver::~ContentFaviconDriver() {
|
| }
|
|
|