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

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

Issue 2677023003: Clean up IconNTP-related code (Closed)
Patch Set: Remove unnecessary includes. 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 8539b03159efaa2447ac6b181be83c54889537bc..2aecafd35a1afc42dd4fdb252f426db2eec242dc 100644
--- a/components/favicon/core/favicon_driver_impl.cc
+++ b/components/favicon/core/favicon_driver_impl.cc
@@ -4,9 +4,7 @@
#include "components/favicon/core/favicon_driver_impl.h"
-#include "base/command_line.h"
#include "base/logging.h"
-#include "base/metrics/field_trial.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "components/bookmarks/browser/bookmark_model.h"
@@ -14,26 +12,10 @@
#include "components/favicon/core/favicon_handler.h"
#include "components/favicon/core/favicon_service.h"
#include "components/history/core/browser/history_service.h"
-#include "ui/base/ui_base_switches.h"
namespace favicon {
namespace {
-// Returns whether icon NTP is enabled by experiment.
-// TODO(huangs): Remove all 3 copies of this routine once Icon NTP launches.
-bool IsIconNTPEnabled() {
- // Note: It's important to query the field trial state first, to ensure that
- // UMA reports the correct group.
- const std::string group_name = base::FieldTrialList::FindFullName("IconNTP");
- using base::CommandLine;
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableIconNtp))
- return false;
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableIconNtp))
- return true;
-
- return base::StartsWith(group_name, "Enabled", base::CompareCase::SENSITIVE);
-}
-
#if defined(OS_ANDROID) || defined(OS_IOS)
const bool kEnableTouchIcon = true;
#else
@@ -52,7 +34,7 @@ FaviconDriverImpl::FaviconDriverImpl(FaviconService* favicon_service,
favicon_service_, this, kEnableTouchIcon
? FaviconDriverObserver::NON_TOUCH_LARGEST
: FaviconDriverObserver::NON_TOUCH_16_DIP));
- if (kEnableTouchIcon || IsIconNTPEnabled()) {
+ if (kEnableTouchIcon) {
touch_icon_handler_.reset(new FaviconHandler(
favicon_service_, this, FaviconDriverObserver::TOUCH_LARGEST));
}
« no previous file with comments | « chrome/renderer/searchbox/searchbox_extension.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698