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

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

Issue 2977033002: Mixed Licenses Enrollment (Closed)
Patch Set: Fix last nit Created 3 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 unified diff | Download patch
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 <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 if (waiting_for_initial_policy_fetch_) { 406 if (waiting_for_initial_policy_fetch_) {
407 UMA_HISTOGRAM_MEDIUM_TIMES(kUMAInitialFetchDelayOAuth2Token, 407 UMA_HISTOGRAM_MEDIUM_TIMES(kUMAInitialFetchDelayOAuth2Token,
408 time_token_available_ - time_init_completed_); 408 time_token_available_ - time_init_completed_);
409 } 409 }
410 410
411 if (error.state() == GoogleServiceAuthError::NONE) { 411 if (error.state() == GoogleServiceAuthError::NONE) {
412 // Start client registration. Either OnRegistrationStateChanged() or 412 // Start client registration. Either OnRegistrationStateChanged() or
413 // OnClientError() will be called back. 413 // OnClientError() will be called back.
414 client()->Register(em::DeviceRegisterRequest::USER, 414 client()->Register(em::DeviceRegisterRequest::USER,
415 em::DeviceRegisterRequest::FLAVOR_USER_REGISTRATION, 415 em::DeviceRegisterRequest::FLAVOR_USER_REGISTRATION,
416 policy_token, std::string(), std::string(), 416 em::LicenseType::UNDEFINED, policy_token, std::string(),
417 std::string()); 417 std::string(), std::string());
418 } else { 418 } else {
419 UMA_HISTOGRAM_ENUMERATION(kUMAInitialFetchOAuth2Error, 419 UMA_HISTOGRAM_ENUMERATION(kUMAInitialFetchOAuth2Error,
420 error.state(), 420 error.state(),
421 GoogleServiceAuthError::NUM_STATES); 421 GoogleServiceAuthError::NUM_STATES);
422 if (error.state() == GoogleServiceAuthError::CONNECTION_FAILED) { 422 if (error.state() == GoogleServiceAuthError::CONNECTION_FAILED) {
423 // Network errors are negative in the code, but the histogram data type 423 // Network errors are negative in the code, but the histogram data type
424 // expects the corresponding positive value. 424 // expects the corresponding positive value.
425 UMA_HISTOGRAM_SPARSE_SLOWLY(kUMAInitialFetchOAuth2NetworkError, 425 UMA_HISTOGRAM_SPARSE_SLOWLY(kUMAInitialFetchOAuth2NetworkError,
426 -error.network_error()); 426 -error.network_error());
427 } 427 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 // OnComponentCloudPolicyUpdated() once it's ready. 494 // OnComponentCloudPolicyUpdated() once it's ready.
495 return; 495 return;
496 } 496 }
497 497
498 core()->StartRefreshScheduler(); 498 core()->StartRefreshScheduler();
499 core()->TrackRefreshDelayPref(local_state_, 499 core()->TrackRefreshDelayPref(local_state_,
500 policy_prefs::kUserPolicyRefreshRate); 500 policy_prefs::kUserPolicyRefreshRate);
501 } 501 }
502 502
503 } // namespace policy 503 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698