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

Unified Diff: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc

Issue 1767443002: Add enterprise enrollment support for fake users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Check instance before derefing it Created 4 years, 8 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
Index: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc
index 47ec950785316cc0ed5127fcf8d542c8deac9da7..0fb6d86013a14a48bb80dad4f408c90e74aa257a 100644
--- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc
@@ -334,7 +334,7 @@ void UserCloudPolicyManagerChromeOS::FetchPolicyOAuthToken() {
->user_context()
.GetRefreshToken();
if (!refresh_token.empty()) {
- token_fetcher_.reset(new PolicyOAuth2TokenFetcher());
+ token_fetcher_.reset(PolicyOAuth2TokenFetcher::CreateInstance());
token_fetcher_->StartWithRefreshToken(
refresh_token, g_browser_process->system_request_context(),
base::Bind(&UserCloudPolicyManagerChromeOS::OnOAuth2PolicyTokenFetched,
@@ -351,7 +351,7 @@ void UserCloudPolicyManagerChromeOS::FetchPolicyOAuthToken() {
return;
}
- token_fetcher_.reset(new PolicyOAuth2TokenFetcher());
+ token_fetcher_.reset(PolicyOAuth2TokenFetcher::CreateInstance());
token_fetcher_->StartWithSigninContext(
signin_context.get(), g_browser_process->system_request_context(),
base::Bind(&UserCloudPolicyManagerChromeOS::OnOAuth2PolicyTokenFetched,

Powered by Google App Engine
This is Rietveld 408576698