| Index: chrome/browser/profiles/profile_io_data.cc
|
| diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
|
| index 1351f9c8efc877db0f2b8525fa5268dca974c7af..298404ce20f08912f1dd7d86cb3df1063fe754fc 100644
|
| --- a/chrome/browser/profiles/profile_io_data.cc
|
| +++ b/chrome/browser/profiles/profile_io_data.cc
|
| @@ -82,6 +82,7 @@
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/browser/resource_context.h"
|
| #include "content/public/common/content_switches.h"
|
| +#include "extensions/features/features.h"
|
| #include "net/base/keygen_handler.h"
|
| #include "net/cert/cert_verifier.h"
|
| #include "net/cert/ct_log_verifier.h"
|
| @@ -112,7 +113,7 @@
|
| #include "net/url_request/url_request_job_factory_impl.h"
|
| #include "third_party/WebKit/public/public_features.h"
|
|
|
| -#if defined(ENABLE_EXTENSIONS)
|
| +#if BUILDFLAG(ENABLE_EXTENSIONS)
|
| #include "chrome/browser/extensions/extension_cookie_monster_delegate.h"
|
| #include "chrome/browser/extensions/extension_resource_protocols.h"
|
| #include "extensions/browser/extension_protocols.h"
|
| @@ -402,7 +403,7 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) {
|
| HostContentSettingsMapFactory::GetForProfile(profile);
|
| params->ssl_config_service = profile->GetSSLConfigService();
|
|
|
| -#if defined(ENABLE_EXTENSIONS)
|
| +#if BUILDFLAG(ENABLE_EXTENSIONS)
|
| params->extension_info_map =
|
| extensions::ExtensionSystem::Get(profile)->info_map();
|
| params->cookie_monster_delegate = new ExtensionCookieMonsterDelegate(profile);
|
| @@ -731,7 +732,7 @@ bool ProfileIOData::IsHandledProtocol(const std::string& scheme) {
|
| url::kFileScheme,
|
| content::kChromeDevToolsScheme,
|
| dom_distiller::kDomDistillerScheme,
|
| -#if defined(ENABLE_EXTENSIONS)
|
| +#if BUILDFLAG(ENABLE_EXTENSIONS)
|
| extensions::kExtensionScheme,
|
| extensions::kExtensionResourceScheme,
|
| #endif
|
| @@ -851,7 +852,7 @@ net::URLRequestContext* ProfileIOData::GetIsolatedMediaRequestContext(
|
|
|
| extensions::InfoMap* ProfileIOData::GetExtensionInfoMap() const {
|
| DCHECK(initialized_) << "ExtensionSystem not initialized";
|
| -#if defined(ENABLE_EXTENSIONS)
|
| +#if BUILDFLAG(ENABLE_EXTENSIONS)
|
| return extension_info_map_.get();
|
| #else
|
| return nullptr;
|
| @@ -861,7 +862,7 @@ extensions::InfoMap* ProfileIOData::GetExtensionInfoMap() const {
|
| extensions::ExtensionThrottleManager*
|
| ProfileIOData::GetExtensionThrottleManager() const {
|
| DCHECK(initialized_) << "ExtensionSystem not initialized";
|
| -#if defined(ENABLE_EXTENSIONS)
|
| +#if BUILDFLAG(ENABLE_EXTENSIONS)
|
| return extension_throttle_manager_.get();
|
| #else
|
| return nullptr;
|
| @@ -1027,13 +1028,13 @@ void ProfileIOData::Init(
|
|
|
| std::unique_ptr<ChromeNetworkDelegate> network_delegate(
|
| new ChromeNetworkDelegate(
|
| -#if defined(ENABLE_EXTENSIONS)
|
| +#if BUILDFLAG(ENABLE_EXTENSIONS)
|
| io_thread_globals->extension_event_router_forwarder.get(),
|
| #else
|
| NULL,
|
| #endif
|
| &enable_referrers_, io_thread->GetMetricsDataUseForwarder()));
|
| -#if defined(ENABLE_EXTENSIONS)
|
| +#if BUILDFLAG(ENABLE_EXTENSIONS)
|
| network_delegate->set_extension_info_map(
|
| profile_params_->extension_info_map.get());
|
| if (!command_line.HasSwitch(switches::kDisableExtensionsHttpThrottling)) {
|
| @@ -1087,7 +1088,7 @@ void ProfileIOData::Init(
|
| // Take ownership over these parameters.
|
| cookie_settings_ = profile_params_->cookie_settings;
|
| host_content_settings_map_ = profile_params_->host_content_settings_map;
|
| -#if defined(ENABLE_EXTENSIONS)
|
| +#if BUILDFLAG(ENABLE_EXTENSIONS)
|
| extension_info_map_ = profile_params_->extension_info_map;
|
| #endif
|
|
|
| @@ -1189,7 +1190,7 @@ ProfileIOData::SetUpJobFactoryDefaults(
|
| base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
|
| DCHECK(set_protocol);
|
|
|
| -#if defined(ENABLE_EXTENSIONS)
|
| +#if BUILDFLAG(ENABLE_EXTENSIONS)
|
| DCHECK(extension_info_map_.get());
|
| // Check only for incognito (and not Chrome OS guest mode GUEST_PROFILE).
|
| bool is_incognito = profile_type() == Profile::INCOGNITO_PROFILE;
|
|
|