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

Unified Diff: chrome/browser/browser_process_impl.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/browser_process_impl.cc
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 673377eccdd755d5bf5280cca67e75e887fabf58..e455394abbc2b44c34aca1c5b03474112753c5da 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
@@ -324,7 +325,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
@@ -572,7 +573,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;
@@ -717,7 +718,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);
@@ -730,7 +731,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();
@@ -1036,7 +1037,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");
« no previous file with comments | « chrome/browser/browser_process_impl.h ('k') | chrome/browser/browsing_data/browsing_data_counter_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698