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

Unified Diff: chrome/browser/profiles/off_the_record_profile_impl.cc

Issue 52343002: policy: Register OffTheRecordProfile at UserCloudPolicyManagerFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 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 f321a6906034cbe1639912d3a8aa5272e05ada06..f130ffdfc6a29de5fa1ef2f1b3d55a047d4051c4 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);
+#endif
+
BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices(
this);
« no previous file with comments | « chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698