diff options
Diffstat (limited to 'chromium/components/favicon/core/favicon_handler.cc')
-rw-r--r-- | chromium/components/favicon/core/favicon_handler.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/chromium/components/favicon/core/favicon_handler.cc b/chromium/components/favicon/core/favicon_handler.cc index ddfc129b658..b03e3d150a3 100644 --- a/chromium/components/favicon/core/favicon_handler.cc +++ b/chromium/components/favicon/core/favicon_handler.cc @@ -223,6 +223,13 @@ void FaviconHandler::FetchFavicon(const GURL& page_url, bool is_same_document) { current_candidate_index_ = 0u; best_favicon_ = DownloadedFavicon(); +#if defined(TOOLKIT_QT) + if (delegate_->IsOffTheRecord()) { + OnFaviconDataForInitialURLFromFaviconService(std::vector<favicon_base::FaviconRawBitmapResult>()); + return; + } +#endif + // Request the favicon from the history service. In parallel to this the // renderer is going to notify us (well WebContents) when the favicon url is // available. We use |last_page_url_| specifically (regardless of other @@ -478,6 +485,9 @@ void FaviconHandler::OnGotInitialHistoryDataAndIconURLCandidates() { // The page lists no candidates that match our target |icon_types_|, so // check if any existing mappings should be deleted. MaybeDeleteFaviconMappings(); +#if defined(TOOLKIT_QT) + delegate_->OnHandlerCompleted(this); +#endif return; } @@ -492,6 +502,9 @@ void FaviconHandler::OnGotInitialHistoryDataAndIconURLCandidates() { // TODO: Store all of the icon URLs associated with a page in history so // that we can check whether the page's icon URLs match the page's icon URLs // at the time that the favicon data was stored to the history database. +#if defined(TOOLKIT_QT) + delegate_->OnHandlerCompleted(this); +#endif return; } @@ -565,6 +578,9 @@ void FaviconHandler::OnDidDownloadFavicon( // Clear download related state. current_candidate_index_ = final_candidates_->size(); best_favicon_ = DownloadedFavicon(); +#if defined(TOOLKIT_QT) + delegate_->OnHandlerCompleted(this); +#endif } } @@ -656,9 +672,13 @@ void FaviconHandler::GetFaviconAndUpdateMappingsUnlessIncognito( // favicon for another page that shares the same favicon. Ask for the // favicon given the favicon URL. if (delegate_->IsOffTheRecord()) { +#if defined(TOOLKIT_QT) + std::move(callback).Run(std::vector<favicon_base::FaviconRawBitmapResult>()); +#else service_->GetFavicon(icon_url, icon_type, preferred_icon_size(), std::move(callback), &cancelable_task_tracker_for_candidates_); +#endif } else { // Ask the history service for the icon. This does two things: // 1. Attempts to fetch the favicon data from the database. @@ -695,6 +715,11 @@ void FaviconHandler::OnFaviconData( ScheduleImageDownload(current_candidate()->icon_url, current_candidate()->icon_type); } +#if defined(TOOLKIT_QT) + else { + delegate_->OnHandlerCompleted(this); + } +#endif } void FaviconHandler::ScheduleImageDownload(const GURL& image_url, |