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

Unified Diff: chrome/browser/chromeos/login/enrollment/enrollment_screen.cc

Issue 418063002: EnrollmentScreen source code cosmetics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/enrollment/enrollment_screen.cc
diff --git a/chrome/browser/chromeos/login/enrollment/enrollment_screen.cc b/chrome/browser/chromeos/login/enrollment/enrollment_screen.cc
index be632d5a85fdb933c4726803fa82ced98d4473a2..26d8cd4203cc267cfe534976ded08232151aeb3a 100644
--- a/chrome/browser/chromeos/login/enrollment/enrollment_screen.cc
+++ b/chrome/browser/chromeos/login/enrollment/enrollment_screen.cc
@@ -127,8 +127,7 @@ void EnrollmentScreen::OnAuthError(const GoogleServiceAuthError& error) {
UMAFailure(policy::kMetricEnrollmentOtherFailed);
}
-void EnrollmentScreen::OnOAuthTokenAvailable(
- const std::string& token) {
+void EnrollmentScreen::OnOAuthTokenAvailable(const std::string& token) {
RegisterForDevicePolicy(token);
}
@@ -182,8 +181,7 @@ void EnrollmentScreen::OnConfirmationClosed() {
}
}
-void EnrollmentScreen::RegisterForDevicePolicy(
- const std::string& token) {
+void EnrollmentScreen::RegisterForDevicePolicy(const std::string& token) {
policy::BrowserPolicyConnectorChromeOS* connector =
g_browser_process->platform_part()->browser_policy_connector_chromeos();
if (connector->IsEnterpriseManaged() &&
@@ -218,10 +216,7 @@ void EnrollmentScreen::ShowEnrollmentStatusOnSuccess(
StartupUtils::MarkOobeCompleted();
}
-void EnrollmentScreen::ReportEnrollmentStatus(
- policy::EnrollmentStatus status) {
- bool success = status.status() == policy::EnrollmentStatus::STATUS_SUCCESS;
- enrollment_failed_once_ |= !success;
+void EnrollmentScreen::ReportEnrollmentStatus(policy::EnrollmentStatus status) {
if (status.status() == policy::EnrollmentStatus::STATUS_SUCCESS) {
StartupUtils::MarkDeviceRegistered(
base::Bind(&EnrollmentScreen::ShowEnrollmentStatusOnSuccess,
@@ -230,6 +225,8 @@ void EnrollmentScreen::ReportEnrollmentStatus(
UMA(is_auto_enrollment() ? policy::kMetricEnrollmentAutoOK
: policy::kMetricEnrollmentOK);
return;
+ } else {
+ enrollment_failed_once_ = true;
}
actor_->ShowEnrollmentStatus(status);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698