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

Side by Side Diff: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc

Issue 14843009: Wire the device requisition parameter for enterprise enrollment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mock Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 if (token_fetcher_->has_oauth2_tokens()) 227 if (token_fetcher_->has_oauth2_tokens())
228 oauth2_login_tokens_ = token_fetcher_->oauth2_tokens(); 228 oauth2_login_tokens_ = token_fetcher_->oauth2_tokens();
229 229
230 if (policy_token.empty()) { 230 if (policy_token.empty()) {
231 // Failed to get a token, stop waiting and use an empty policy. 231 // Failed to get a token, stop waiting and use an empty policy.
232 CancelWaitForPolicyFetch(); 232 CancelWaitForPolicyFetch();
233 } else { 233 } else {
234 // Start client registration. Either OnRegistrationStateChanged() or 234 // Start client registration. Either OnRegistrationStateChanged() or
235 // OnClientError() will be called back. 235 // OnClientError() will be called back.
236 client()->Register(em::DeviceRegisterRequest::USER, 236 client()->Register(em::DeviceRegisterRequest::USER,
237 policy_token, std::string(), false); 237 policy_token, std::string(), false, std::string());
238 } 238 }
239 239
240 token_fetcher_.reset(); 240 token_fetcher_.reset();
241 } 241 }
242 242
243 void UserCloudPolicyManagerChromeOS::OnInitialPolicyFetchComplete( 243 void UserCloudPolicyManagerChromeOS::OnInitialPolicyFetchComplete(
244 bool success) { 244 bool success) {
245 CancelWaitForPolicyFetch(); 245 CancelWaitForPolicyFetch();
246 } 246 }
247 247
(...skipping 21 matching lines...) Expand all
269 // start the scheduler. The |component_policy_service_| will call back into 269 // start the scheduler. The |component_policy_service_| will call back into
270 // OnComponentCloudPolicyUpdated() once it's ready. 270 // OnComponentCloudPolicyUpdated() once it's ready.
271 return; 271 return;
272 } 272 }
273 273
274 core()->StartRefreshScheduler(); 274 core()->StartRefreshScheduler();
275 core()->TrackRefreshDelayPref(local_state_, prefs::kUserPolicyRefreshRate); 275 core()->TrackRefreshDelayPref(local_state_, prefs::kUserPolicyRefreshRate);
276 } 276 }
277 277
278 } // namespace policy 278 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc ('k') | chrome/browser/policy/cloud/cloud_policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698