Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/ui/webui/chromeos/login/enterprise_oauth_enrollment_scr een_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_scr een_handler.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/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 238 ShowError(IDS_ENTERPRISE_ENROLLMENT_NETWORK_ENROLLMENT_ERROR, true); | 238 ShowError(IDS_ENTERPRISE_ENROLLMENT_NETWORK_ENROLLMENT_ERROR, true); |
| 239 NotifyObservers(false); | 239 NotifyObservers(false); |
| 240 } | 240 } |
| 241 | 241 |
| 242 void EnterpriseOAuthEnrollmentScreenHandler::ShowLockboxTimeoutError() { | 242 void EnterpriseOAuthEnrollmentScreenHandler::ShowLockboxTimeoutError() { |
| 243 UMAFailure(policy::kMetricLockboxTimeoutError); | 243 UMAFailure(policy::kMetricLockboxTimeoutError); |
| 244 ShowError(IDS_ENTERPRISE_LOCKBOX_TIMEOUT_ERROR, true); | 244 ShowError(IDS_ENTERPRISE_LOCKBOX_TIMEOUT_ERROR, true); |
| 245 NotifyObservers(false); | 245 NotifyObservers(false); |
| 246 } | 246 } |
| 247 | 247 |
| 248 void EnterpriseOAuthEnrollmentScreenHandler::ShowUserEnrollmentError() { | |
|
Nikita (slow)
2012/06/14 12:42:55
nit: rename to ShowDomainMismatchError()
pastarmovj
2012/06/18 14:57:27
Done.
| |
| 249 UMAFailure(policy::kMetricEnrollmentWrongUserError); | |
| 250 ShowError(IDS_ENTERPRISE_ENROLLMENT_DOMAIN_MISMATCH_ERROR, true); | |
| 251 NotifyObservers(false); | |
| 252 } | |
| 253 | |
| 248 void EnterpriseOAuthEnrollmentScreenHandler::SubmitTestCredentials( | 254 void EnterpriseOAuthEnrollmentScreenHandler::SubmitTestCredentials( |
| 249 const std::string& email, | 255 const std::string& email, |
| 250 const std::string& password) { | 256 const std::string& password) { |
| 251 test_email_ = email; | 257 test_email_ = email; |
| 252 test_password_ = password; | 258 test_password_ = password; |
| 253 DoShow(); | 259 DoShow(); |
| 254 } | 260 } |
| 255 | 261 |
| 256 // EnterpriseOAuthEnrollmentScreenHandler BaseScreenHandler implementation ----- | 262 // EnterpriseOAuthEnrollmentScreenHandler BaseScreenHandler implementation ----- |
| 257 | 263 |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 553 controller_->OnConfirmationClosed(back_to_signin); | 559 controller_->OnConfirmationClosed(back_to_signin); |
| 554 } | 560 } |
| 555 | 561 |
| 556 void EnterpriseOAuthEnrollmentScreenHandler::UMAFailure(int sample) { | 562 void EnterpriseOAuthEnrollmentScreenHandler::UMAFailure(int sample) { |
| 557 if (is_auto_enrollment_) | 563 if (is_auto_enrollment_) |
| 558 sample = policy::kMetricEnrollmentAutoFailed; | 564 sample = policy::kMetricEnrollmentAutoFailed; |
| 559 UMA(sample); | 565 UMA(sample); |
| 560 } | 566 } |
| 561 | 567 |
| 562 } // namespace chromeos | 568 } // namespace chromeos |
| OLD | NEW |