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

Unified Diff: components/favicon/core/favicon_driver_impl.cc

Issue 2732653002: Add favicon integration tests for FaviconDriverImpl (Closed)
Patch Set: Added verification of color Created 3 years, 10 months 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 side-by-side diff with in-line comments
Download patch
Index: components/favicon/core/favicon_driver_impl.cc
diff --git a/components/favicon/core/favicon_driver_impl.cc b/components/favicon/core/favicon_driver_impl.cc
index 453c96b02e0efa5427f298518c969b93a8cb2f21..f9b8a225a3732e07e5a59f8504388ca4c7819ab5 100644
--- a/components/favicon/core/favicon_driver_impl.cc
+++ b/components/favicon/core/favicon_driver_impl.cc
@@ -18,12 +18,6 @@
namespace favicon {
namespace {
-#if defined(OS_ANDROID) || defined(OS_IOS)
-const bool kEnableTouchIcon = true;
-#else
-const bool kEnableTouchIcon = false;
-#endif
-
void RecordCandidateMetrics(const std::vector<FaviconURL>& candidates) {
size_t with_defined_touch_icons = 0;
size_t with_defined_sizes = 0;
@@ -46,17 +40,18 @@ void RecordCandidateMetrics(const std::vector<FaviconURL>& candidates) {
} // namespace
-FaviconDriverImpl::FaviconDriverImpl(FaviconService* favicon_service,
+FaviconDriverImpl::FaviconDriverImpl(bool enable_touch_icons,
+ FaviconService* favicon_service,
history::HistoryService* history_service,
bookmarks::BookmarkModel* bookmark_model)
: favicon_service_(favicon_service),
history_service_(history_service),
bookmark_model_(bookmark_model) {
favicon_handler_.reset(new FaviconHandler(
- favicon_service_, this, kEnableTouchIcon
- ? FaviconDriverObserver::NON_TOUCH_LARGEST
- : FaviconDriverObserver::NON_TOUCH_16_DIP));
- if (kEnableTouchIcon) {
+ favicon_service_, this,
+ enable_touch_icons ? FaviconDriverObserver::NON_TOUCH_LARGEST
+ : FaviconDriverObserver::NON_TOUCH_16_DIP));
+ if (enable_touch_icons) {
touch_icon_handler_.reset(new FaviconHandler(
favicon_service_, this, FaviconDriverObserver::TOUCH_LARGEST));
}
« no previous file with comments | « components/favicon/core/favicon_driver_impl.h ('k') | components/favicon/core/favicon_driver_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698