summaryrefslogtreecommitdiffstats
path: root/chrome/browser/favicon/favicon_tab_helper_browsertest.cc
diff options
context:
space:
mode:
authorsdefresne <sdefresne@chromium.org>2015-04-09 07:00:17 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-09 14:00:45 +0000
commit70a04802728cbdc0c3da3c5a43fd2aa6feaf1ca8 (patch)
tree55cc56a7d0edc3766846d9467519877b1a81f45b /chrome/browser/favicon/favicon_tab_helper_browsertest.cc
parent181fd73aa111fff257616435820a6392e309a5e5 (diff)
downloadchromium_src-70a04802728cbdc0c3da3c5a43fd2aa6feaf1ca8.zip
chromium_src-70a04802728cbdc0c3da3c5a43fd2aa6feaf1ca8.tar.gz
chromium_src-70a04802728cbdc0c3da3c5a43fd2aa6feaf1ca8.tar.bz2
Componentize FaviconTabHelper
Split FaviconTabHelper into three classes depending on what can be shared with iOS (FaviconDriverImpl), what only depends on //content (ContentFaviconDriver) and what depends on //chrome (FaviconTabHelper). FaviconTabHelper still exists to provide an easier factory (as ContentFaviconDriver cannot access KeyedService factories defined in //chrome) as FaviconTabHelper::CreateForWebContents() is called from multiple locations in //chrome code and to provide an implementation for FaviconTabHelper::ShouldDisplayFavicon (this method will be turned into a free function in a followup CL as it only depends on WebContents public interface, not on ContentFaviconDriver). Introduce WebFaviconDriver, an iOS implementation of FaviconDriver that uses FaviconDriverImpl to share as much code as possible with the ContentFaviconDriver. BUG=370877, 472117 Review URL: https://codereview.chromium.org/1064823002 Cr-Commit-Position: refs/heads/master@{#324430}
Diffstat (limited to 'chrome/browser/favicon/favicon_tab_helper_browsertest.cc')
-rw-r--r--chrome/browser/favicon/favicon_tab_helper_browsertest.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/chrome/browser/favicon/favicon_tab_helper_browsertest.cc b/chrome/browser/favicon/favicon_tab_helper_browsertest.cc
index 8722b5b..567d825 100644
--- a/chrome/browser/favicon/favicon_tab_helper_browsertest.cc
+++ b/chrome/browser/favicon/favicon_tab_helper_browsertest.cc
@@ -187,11 +187,8 @@ class FaviconTabHelperTest : public InProcessBrowserTest,
// FaviconTabHelperPendingTaskChecker:
bool HasPendingTasks() override {
- favicon::FaviconHandler* favicon_handler =
- FaviconTabHelper::FromWebContents(web_contents())
- ->favicon_handler_.get();
- return !favicon_handler->download_requests_.empty() ||
- favicon_handler->cancelable_task_tracker_.HasTrackedTasks();
+ return FaviconTabHelper::FromWebContents(web_contents())
+ ->HasPendingTasksForTest();
}
private: