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

Unified Diff: chrome/browser/banners/app_banner_manager_desktop.cc

Issue 2944283002: Replace --add-to-shelf flag with kAppBanners feature. (Closed)
Patch Set: Rebase Created 3 years, 6 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: chrome/browser/banners/app_banner_manager_desktop.cc
diff --git a/chrome/browser/banners/app_banner_manager_desktop.cc b/chrome/browser/banners/app_banner_manager_desktop.cc
index 415d801fc33923bfe6907afa139b52c4a921e197..f96c4abaa7106485039945c8670b18d9a3fec236 100644
--- a/chrome/browser/banners/app_banner_manager_desktop.cc
+++ b/chrome/browser/banners/app_banner_manager_desktop.cc
@@ -5,13 +5,14 @@
#include "chrome/browser/banners/app_banner_manager_desktop.h"
#include "base/command_line.h"
+#include "base/feature_list.h"
#include "build/build_config.h"
#include "chrome/browser/banners/app_banner_infobar_delegate_desktop.h"
#include "chrome/browser/banners/app_banner_metrics.h"
#include "chrome/browser/banners/app_banner_settings_helper.h"
#include "chrome/browser/extensions/bookmark_app_helper.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/common/chrome_switches.h"
+#include "chrome/common/chrome_features.h"
#include "chrome/common/web_application_info.h"
#include "extensions/common/constants.h"
@@ -20,13 +21,7 @@ DEFINE_WEB_CONTENTS_USER_DATA_KEY(banners::AppBannerManagerDesktop);
namespace banners {
bool AppBannerManagerDesktop::IsEnabled() {
-#if defined(OS_CHROMEOS)
- return !base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableAddToShelf);
-#else
- return base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableAddToShelf);
-#endif
+ return base::FeatureList::IsEnabled(features::kAppBanners);
}
AppBannerManagerDesktop::AppBannerManagerDesktop(
« no previous file with comments | « chrome/browser/banners/app_banner_manager_browsertest.cc ('k') | chrome/browser/extensions/extension_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698