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

Unified Diff: chrome/browser/sessions/chrome_tab_restore_service_client.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
Index: chrome/browser/sessions/chrome_tab_restore_service_client.cc
diff --git a/chrome/browser/sessions/chrome_tab_restore_service_client.cc b/chrome/browser/sessions/chrome_tab_restore_service_client.cc
index 9ea44a2e4fa1c5976be78d4c8fedb4dbe8fb1222..8d7ebe40ba17273bf4610c4de354cd8e2240ccd8 100644
--- a/chrome/browser/sessions/chrome_tab_restore_service_client.cc
+++ b/chrome/browser/sessions/chrome_tab_restore_service_client.cc
@@ -11,8 +11,9 @@
#include "chrome/common/url_constants.h"
#include "components/sessions/content/content_live_tab.h"
#include "content/public/browser/browser_thread.h"
+#include "extensions/features/features.h"
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/tab_helper.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_metrics.h"
@@ -30,7 +31,7 @@
namespace {
void RecordAppLaunch(Profile* profile, const GURL& url) {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
const extensions::Extension* extension =
extensions::ExtensionRegistry::Get(profile)
->enabled_extensions()
@@ -40,7 +41,7 @@ void RecordAppLaunch(Profile* profile, const GURL& url) {
extensions::RecordAppLaunchType(
extension_misc::APP_LAUNCH_NTP_RECENTLY_CLOSED, extension->GetType());
-#endif // defined(ENABLE_EXTENSIONS)
+#endif // BUILDFLAG(ENABLE_EXTENSIONS)
}
} // namespace
@@ -91,7 +92,7 @@ std::string ChromeTabRestoreServiceClient::GetExtensionAppIDForTab(
sessions::LiveTab* tab) {
std::string extension_app_id;
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
extensions::TabHelper* extensions_tab_helper =
extensions::TabHelper::FromWebContents(
static_cast<sessions::ContentLiveTab*>(tab)->web_contents());
« no previous file with comments | « chrome/browser/safe_browsing/incident_reporting/last_download_finder.cc ('k') | chrome/browser/sessions/session_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698