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 ae2c925079e93d1521644158c04d28f5c8d205ae..388f7fe33ffe91cca5ad142462db875ce53cdda2 100644 |
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc |
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc |
@@ -20,7 +20,6 @@ |
#include "chrome/browser/download/chrome_download_manager_delegate.h" |
#include "chrome/browser/download/download_service.h" |
#include "chrome/browser/download/download_service_factory.h" |
-#include "chrome/browser/extensions/api/web_request/web_request_api.h" |
#include "chrome/browser/extensions/extension_service.h" |
#include "chrome/browser/extensions/extension_special_storage_policy.h" |
#include "chrome/browser/io_thread.h" |
@@ -74,10 +73,15 @@ |
#include "chrome/browser/guest_view/guest_view_manager.h" |
#endif |
+#if defined(ENABLE_EXTENSIONS) |
+#include "chrome/browser/extensions/api/web_request/web_request_api.h" |
+#endif |
+ |
using content::BrowserThread; |
using content::DownloadManagerDelegate; |
using content::HostZoomMap; |
+#if defined(ENABLE_EXTENSIONS) |
namespace { |
void NotifyOTRProfileCreatedOnIOThread(void* original_profile, |
@@ -93,6 +97,7 @@ void NotifyOTRProfileDestroyedOnIOThread(void* original_profile, |
} |
} // namespace |
+#endif |
OffTheRecordProfileImpl::OffTheRecordProfileImpl(Profile* real_profile) |
: profile_(real_profile), |
@@ -148,9 +153,11 @@ void OffTheRecordProfileImpl::Init() { |
io_data_->GetResourceContextNoInit()); |
#endif |
+#if defined(ENABLE_EXTENSIONS) |
BrowserThread::PostTask( |
BrowserThread::IO, FROM_HERE, |
base::Bind(&NotifyOTRProfileCreatedOnIOThread, profile_, this)); |
+#endif |
} |
OffTheRecordProfileImpl::~OffTheRecordProfileImpl() { |
@@ -164,9 +171,11 @@ OffTheRecordProfileImpl::~OffTheRecordProfileImpl() { |
BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices( |
this); |
+#if defined(ENABLE_EXTENSIONS) |
BrowserThread::PostTask( |
BrowserThread::IO, FROM_HERE, |
base::Bind(&NotifyOTRProfileDestroyedOnIOThread, profile_, this)); |
+#endif |
if (host_content_settings_map_.get()) |
host_content_settings_map_->ShutdownOnUIThread(); |