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

Unified Diff: chrome/browser/chromeos/login/policy_oauth_fetcher.cc

Issue 11415094: Split UserCloudPolicyManager implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bring back ProxyPolicyProvider, fix local_state policy provider, fix Joao's fine CloudPolicyTest. Created 8 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/chromeos/login/policy_oauth_fetcher.cc
diff --git a/chrome/browser/chromeos/login/policy_oauth_fetcher.cc b/chrome/browser/chromeos/login/policy_oauth_fetcher.cc
index bcd311895c6adc1f78b83b8997a467f57704beab..b7b95b9b86f051db9f6fb308b96919f4e1471993 100644
--- a/chrome/browser/chromeos/login/policy_oauth_fetcher.cc
+++ b/chrome/browser/chromeos/login/policy_oauth_fetcher.cc
@@ -7,7 +7,7 @@
#include "base/logging.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/policy/browser_policy_connector.h"
-#include "chrome/browser/policy/user_cloud_policy_manager.h"
+#include "chrome/browser/policy/user_cloud_policy_manager_chromeos.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "google_apis/gaia/gaia_constants.h"
@@ -95,13 +95,13 @@ void PolicyOAuthFetcher::OnOAuthWrapBridgeFailure(
void PolicyOAuthFetcher::SetPolicyToken(const std::string& token) {
policy_token_ = token;
- g_browser_process->browser_policy_connector()->RegisterForUserPolicy(token);
- // The Profile object passed in to the constructor is destroyed after the
- // login process is complete. Get the UserCloudPolicyManager from the user's
- // default profile instead.
- policy::UserCloudPolicyManager* cloud_policy_manager =
- ProfileManager::GetDefaultProfile()->GetUserCloudPolicyManager();
+ policy::BrowserPolicyConnector* browser_policy_connector =
+ g_browser_process->browser_policy_connector();
+ browser_policy_connector->RegisterForUserPolicy(token);
+
+ policy::UserCloudPolicyManagerChromeOS* cloud_policy_manager =
+ browser_policy_connector->GetUserCloudPolicyManager();
if (cloud_policy_manager) {
if (token.empty())
cloud_policy_manager->CancelWaitForPolicyFetch();

Powered by Google App Engine
This is Rietveld 408576698