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

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

Issue 10823212: Relanding this as this did not fix the chromiumos breakage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months 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.h ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
===================================================================
--- chrome/browser/profiles/profile_impl.cc (revision 150400)
+++ chrome/browser/profiles/profile_impl.cc (working copy)
@@ -56,6 +56,7 @@
#include "chrome/browser/net/url_fixer_upper.h"
#include "chrome/browser/plugin_prefs.h"
#include "chrome/browser/policy/policy_service.h"
+#include "chrome/browser/policy/user_cloud_policy_manager.h"
#include "chrome/browser/prefs/browser_prefs.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/prerender/prerender_manager_factory.h"
@@ -286,10 +287,17 @@
session_restore_enabled_ =
!command_line->HasSwitch(switches::kDisableRestoreSessionState);
#if defined(ENABLE_CONFIGURATION_POLICY)
- policy_service_.reset(
- g_browser_process->browser_policy_connector()->CreatePolicyService(this));
+ // TODO(atwilson): Change these to ProfileKeyedServices once PrefService is
+ // a ProfileKeyedService (policy must be initialized before PrefService
+ // because PrefService depends on policy loading to get overridden pref
+ // values).
+ cloud_policy_manager_ =
+ g_browser_process->browser_policy_connector()->CreateCloudPolicyManager(
+ this);
+ policy_service_ =
+ g_browser_process->browser_policy_connector()->CreatePolicyService(this);
#else
- policy_service_.reset(new policy::PolicyServiceStub());
+ policy_service_.reset(new policy::PolicyServiceStub());
#endif
if (create_mode == CREATE_MODE_ASYNCHRONOUS) {
prefs_.reset(PrefService::CreatePrefService(
@@ -649,6 +657,10 @@
return (profile_version.CompareTo(arg_version) >= 0);
}
+policy::UserCloudPolicyManager* ProfileImpl::GetUserCloudPolicyManager() {
+ return cloud_policy_manager_.get();
+}
+
policy::PolicyService* ProfileImpl::GetPolicyService() {
DCHECK(policy_service_.get()); // Should explicitly be initialized.
return policy_service_.get();
Property changes on: chrome\browser\profiles\profile_impl.cc
___________________________________________________________________
Added: svn:mergeinfo
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698