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

Unified Diff: chrome/browser/profiles/off_the_record_profile_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/profiles/off_the_record_profile_impl.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index 2d8ce6dfa70d5f194ce26dc066cc6791a256a49d..c6af133bad3b19384a52073214f3192fae7f91ad 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -56,6 +56,7 @@
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/url_data_source.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/features/features.h"
#include "net/http/http_server_properties.h"
#include "net/http/transport_security_state.h"
#include "storage/browser/database/database_tracker.h"
@@ -74,7 +75,7 @@
#include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h"
#endif
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_special_storage_policy.h"
#include "components/guest_view/browser/guest_view_manager.h"
@@ -93,7 +94,7 @@ using content::BrowserThread;
using content::DownloadManagerDelegate;
using content::HostZoomMap;
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
namespace {
void NotifyOTRProfileCreatedOnIOThread(void* original_profile,
@@ -153,7 +154,7 @@ void OffTheRecordProfileImpl::Init() {
this, io_data_->GetResourceContextNoInit());
#endif
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
// Make the chrome//extension-icon/ resource available.
extensions::ExtensionIconSource* icon_source =
new extensions::ExtensionIconSource(profile_);
@@ -180,7 +181,7 @@ OffTheRecordProfileImpl::~OffTheRecordProfileImpl() {
BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices(
this);
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&NotifyOTRProfileDestroyedOnIOThread, profile_, this));
@@ -365,7 +366,7 @@ net::SSLConfigService* OffTheRecordProfileImpl::GetSSLConfigService() {
}
content::BrowserPluginGuestManager* OffTheRecordProfileImpl::GetGuestManager() {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
return guest_view::GuestViewManager::FromBrowserContext(this);
#else
return NULL;
@@ -374,7 +375,7 @@ content::BrowserPluginGuestManager* OffTheRecordProfileImpl::GetGuestManager() {
storage::SpecialStoragePolicy*
OffTheRecordProfileImpl::GetSpecialStoragePolicy() {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
return GetExtensionSpecialStoragePolicy();
#else
return NULL;

Powered by Google App Engine
This is Rietveld 408576698