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

Unified Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.cc

Issue 2406303003: Move enable_app_list to a buildflag. (Closed)
Patch Set: More grit defines Created 4 years, 2 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/ui/webui/ntp/app_launcher_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index 40ef8de19e6ba7f326a52afa07e3969dcd0f11db..a8c2df64327b99da934c88f7f951944c1b28fd5f 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -44,6 +44,7 @@
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_metrics.h"
#include "chrome/common/extensions/manifest_handlers/app_launch_info.h"
+#include "chrome/common/features.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/common/web_application_info.h"
@@ -232,7 +233,7 @@ void AppLauncherHandler::RegisterMessages() {
content::Source<WebContents>(web_ui()->GetWebContents()));
// Some tests don't have a local state.
-#if defined(ENABLE_APP_LIST)
+#if BUILDFLAG(ENABLE_APP_LIST)
if (g_browser_process->local_state()) {
local_state_pref_change_registrar_.Init(g_browser_process->local_state());
local_state_pref_change_registrar_.Add(
@@ -737,7 +738,7 @@ void AppLauncherHandler::HandleGenerateAppForLink(const base::ListValue* args) {
void AppLauncherHandler::HandleStopShowingAppLauncherPromo(
const base::ListValue* args) {
-#if defined(ENABLE_APP_LIST)
+#if BUILDFLAG(ENABLE_APP_LIST)
g_browser_process->local_state()->SetBoolean(
prefs::kShowAppLauncherPromo, false);
RecordAppLauncherPromoHistogram(apps::APP_LAUNCHER_PROMO_DISMISSED);
@@ -797,7 +798,7 @@ void AppLauncherHandler::OnExtensionPreferenceChanged() {
}
void AppLauncherHandler::OnLocalStatePreferenceChanged() {
-#if defined(ENABLE_APP_LIST)
+#if BUILDFLAG(ENABLE_APP_LIST)
web_ui()->CallJavascriptFunctionUnsafe(
"ntp.appLauncherPromoPrefChangeCallback",
base::FundamentalValue(g_browser_process->local_state()->GetBoolean(
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc ('k') | chrome/browser/ui/webui/ntp/ntp_resource_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698