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

Unified Diff: chrome/browser/ui/webui/policy_ui.cc

Issue 44083005: policy: Remove UserCloudPolicyManagerFactory's dependency on Profile. (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
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/policy_ui.cc
diff --git a/chrome/browser/ui/webui/policy_ui.cc b/chrome/browser/ui/webui/policy_ui.cc
index e2e833cac503f97f558584537e42b4b7d78bfd4b..28a665c62d7fde1530c2a484a40966e1c6e36372 100644
--- a/chrome/browser/ui/webui/policy_ui.cc
+++ b/chrome/browser/ui/webui/policy_ui.cc
@@ -56,6 +56,7 @@
#else
#include "chrome/browser/policy/cloud/user_cloud_policy_manager.h"
#include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h"
+#include "content/public/browser/web_contents.h"
#endif
#if !defined(OS_ANDROID) && !defined(OS_IOS)
@@ -488,8 +489,8 @@ void PolicyUIHandler::RegisterMessages() {
}
#else
policy::UserCloudPolicyManager* user_cloud_policy_manager =
- policy::UserCloudPolicyManagerFactory::GetForProfile(
- Profile::FromWebUI(web_ui()));
+ policy::UserCloudPolicyManagerFactory::GetForBrowserContext(
+ web_ui()->GetWebContents()->GetBrowserContext());
if (user_cloud_policy_manager) {
user_status_provider_.reset(
new UserPolicyStatusProvider(user_cloud_policy_manager->core()));
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698