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

Unified Diff: chrome/browser/ui/browser_commands.cc

Issue 2479593006: Move enable extensions define to a build flag. (Closed)
Patch Set: Merge Created 4 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/browser_close_unittest.cc ('k') | chrome/browser/ui/browser_navigator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_commands.cc
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index c612bc7f27494e29f8092bdf71b258ac17763e77..89f35b6ecb9be583578c026861e89727d203965e 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -83,11 +83,12 @@
#include "content/public/common/url_constants.h"
#include "content/public/common/url_utils.h"
#include "content/public/common/user_agent.h"
+#include "extensions/features/features.h"
#include "net/base/escape.h"
#include "printing/features/features.h"
#include "ui/events/keycodes/keyboard_codes.h"
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/api/commands/command_service.h"
#include "chrome/browser/extensions/api/extension_action/extension_action_api.h"
#include "chrome/browser/extensions/tab_helper.h"
@@ -143,7 +144,7 @@ bool CanBookmarkCurrentPageInternal(const Browser* browser,
!chrome::ShouldRemoveBookmarkThisPageUI(browser->profile()));
}
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
bool GetBookmarkOverrideCommand(
Profile* profile,
const extensions::Extension** extension,
@@ -457,7 +458,7 @@ void Home(Browser* browser, WindowOpenDisposition disposition) {
GURL url = browser->profile()->GetHomePage();
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
// With bookmark apps enabled, hosted apps should return to their launch page
// when the home button is pressed.
if (browser->is_app()) {
@@ -523,7 +524,7 @@ void OpenCurrentURL(Browser* browser) {
TabStripModel::ADD_FORCE_INDEX | TabStripModel::ADD_INHERIT_OPENER;
Navigate(&params);
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
DCHECK(extensions::ExtensionSystem::Get(
browser->profile())->extension_service());
const extensions::Extension* extension =
@@ -762,7 +763,7 @@ void BookmarkCurrentPageIgnoringExtensionOverrides(Browser* browser) {
void BookmarkCurrentPageAllowingExtensionOverrides(Browser* browser) {
DCHECK(!chrome::ShouldRemoveBookmarkThisPageUI(browser->profile()));
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
const extensions::Extension* extension = NULL;
extensions::Command command;
extensions::CommandService::ExtensionCommandType command_type;
@@ -1258,7 +1259,7 @@ bool CanViewSource(const Browser* browser) {
CanViewSource();
}
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
void CreateApplicationShortcuts(Browser* browser) {
content::RecordAction(UserMetricsAction("CreateShortcut"));
extensions::TabHelper::FromWebContents(
@@ -1302,6 +1303,6 @@ void ConvertTabToAppWindow(Browser* browser,
contents->GetRenderViewHost()->SyncRendererPrefs();
app_browser->window()->Show();
}
-#endif // defined(ENABLE_EXTENSIONS)
+#endif // BUILDFLAG(ENABLE_EXTENSIONS)
} // namespace chrome
« no previous file with comments | « chrome/browser/ui/browser_close_unittest.cc ('k') | chrome/browser/ui/browser_navigator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698