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

Unified Diff: chrome/browser/browser_process_impl.cc

Issue 2479593006: Move enable extensions define to a build flag. (Closed)
Patch Set: Test updates 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/browser_process_impl.cc
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 3066504299868e9104db0311eef627697415c292..b07dbac05243d4a0f093fac4fca71812c0682dc8 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -117,6 +117,7 @@
#include "content/public/browser/storage_partition.h"
#include "content/public/common/content_switches.h"
#include "extensions/common/constants.h"
+#include "extensions/features/features.h"
#include "net/socket/client_socket_pool_manager.h"
#include "net/url_request/url_request_context_getter.h"
#include "printing/features/features.h"
@@ -143,7 +144,7 @@
#include "chrome/browser/background/background_mode_manager.h"
#endif
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/chrome_extensions_browser_client.h"
#include "chrome/browser/extensions/event_router_forwarder.h"
#include "chrome/browser/media_galleries/media_file_system_registry.h"
@@ -236,7 +237,7 @@ BrowserProcessImpl::BrowserProcessImpl(
device_client_.reset(new ChromeDeviceClient);
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
// Athena sets its own instance during Athena's init process.
extensions::AppWindowClient::Set(ChromeAppWindowClient::GetInstance());
@@ -261,7 +262,7 @@ BrowserProcessImpl::BrowserProcessImpl(
}
BrowserProcessImpl::~BrowserProcessImpl() {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
extensions::ExtensionsBrowserClient::Set(nullptr);
#endif
@@ -323,7 +324,7 @@ void BrowserProcessImpl::StartTearDown() {
child_process_watcher_.reset();
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
media_file_system_registry_.reset();
// Remove the global instance of the Storage Monitor now. Otherwise the
// FILE thread would be gone when we try to release it in the dtor and
@@ -571,7 +572,7 @@ BrowserProcessPlatformPart* BrowserProcessImpl::platform_part() {
extensions::EventRouterForwarder*
BrowserProcessImpl::extension_event_router_forwarder() {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
return extension_event_router_forwarder_.get();
#else
return NULL;
@@ -716,7 +717,7 @@ const std::string& BrowserProcessImpl::GetApplicationLocale() {
void BrowserProcessImpl::SetApplicationLocale(const std::string& locale) {
locale_ = locale;
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
extension_l10n_util::SetProcessLocale(locale);
#endif
ChromeContentBrowserClient::SetApplicationLocale(locale);
@@ -729,7 +730,7 @@ DownloadStatusUpdater* BrowserProcessImpl::download_status_updater() {
}
MediaFileSystemRegistry* BrowserProcessImpl::media_file_system_registry() {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
if (!media_file_system_registry_)
media_file_system_registry_.reset(new MediaFileSystemRegistry());
return media_file_system_registry_.get();
@@ -1035,7 +1036,7 @@ void BrowserProcessImpl::CreateLocalState() {
}
void BrowserProcessImpl::PreCreateThreads() {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
// Register the chrome-extension scheme to reflect the extension process
// model. Controlled by a field trial, so we can't do this earlier.
base::FieldTrialList::FindFullName("SiteIsolationExtensions");

Powered by Google App Engine
This is Rietveld 408576698