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

Side by Side Diff: chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.cc

Issue 2371213002: Refactor: Inject StatisticsProvider as a dependency of DeviceCloudPolicyInitializer. (Closed)
Patch Set: Created 4 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/login/enrollment/enterprise_enrollment_helper_ impl.h" 5 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_ impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 // consumer enrollment. 410 // consumer enrollment.
411 UMA(policy::kMetricEnrollmentStoreTokenAndIdFailed); 411 UMA(policy::kMetricEnrollmentStoreTokenAndIdFailed);
412 NOTREACHED(); 412 NOTREACHED();
413 break; 413 break;
414 case policy::EnrollmentStatus::STATUS_ATTRIBUTE_UPDATE_FAILED: 414 case policy::EnrollmentStatus::STATUS_ATTRIBUTE_UPDATE_FAILED:
415 UMA(policy::kMetricEnrollmentAttributeUpdateFailed); 415 UMA(policy::kMetricEnrollmentAttributeUpdateFailed);
416 break; 416 break;
417 case policy::EnrollmentStatus::STATUS_REGISTRATION_CERTIFICATE_FETCH_FAILED: 417 case policy::EnrollmentStatus::STATUS_REGISTRATION_CERTIFICATE_FETCH_FAILED:
418 UMA(policy::kMetricEnrollmentRegistrationCertificateFetchFailed); 418 UMA(policy::kMetricEnrollmentRegistrationCertificateFetchFailed);
419 break; 419 break;
420 case policy::EnrollmentStatus::STATUS_NO_MACHINE_IDENTIFICATION:
421 UMA(policy::kMetricEnrollmentNoDeviceIdentification);
422 break;
420 } 423 }
421 } 424 }
422 425
423 void EnterpriseEnrollmentHelperImpl::UMA(policy::MetricEnrollment sample) { 426 void EnterpriseEnrollmentHelperImpl::UMA(policy::MetricEnrollment sample) {
424 EnrollmentUMA(sample, enrollment_config_.mode); 427 EnrollmentUMA(sample, enrollment_config_.mode);
425 } 428 }
426 429
427 void EnterpriseEnrollmentHelperImpl::OnSigninProfileCleared( 430 void EnterpriseEnrollmentHelperImpl::OnSigninProfileCleared(
428 const base::Closure& callback) { 431 const base::Closure& callback) {
429 oauth_data_cleared_ = true; 432 oauth_data_cleared_ = true;
430 callback.Run(); 433 callback.Run();
431 } 434 }
432 435
433 } // namespace chromeos 436 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698