Chromium Code Reviews| 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 642da2313bc415a5fc18d3b572f522029bc4ebb8..a93ea138477b4037f5a91f64e5fcce46c9535f5b 100644 |
| --- a/chrome/browser/profiles/off_the_record_profile_impl.cc |
| +++ b/chrome/browser/profiles/off_the_record_profile_impl.cc |
| @@ -66,6 +66,10 @@ |
| #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| #endif |
| +#if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS) |
| +#include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h" |
| +#endif |
| + |
| using content::BrowserThread; |
| using content::DownloadManagerDelegate; |
| using content::HostZoomMap; |
| @@ -96,6 +100,13 @@ OffTheRecordProfileImpl::OffTheRecordProfileImpl(Profile* real_profile) |
| } |
| void OffTheRecordProfileImpl::Init() { |
| +#if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS) |
| + // Because UserCloudPolicyManager is in a component, it cannot access |
| + // GetOriginalProfile. Instead, we have to inject this relation here. |
| + policy::UserCloudPolicyManagerFactory::RegisterForOffTheRecordProfile( |
| + this->GetOriginalProfile(), this); |
|
Elliot Glaysher
2013/11/04 20:12:37
I assume there's going to be more services like th
|
| +#endif |
| + |
| BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices( |
| this); |