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

Side by Side Diff: chrome/browser/chromeos/login/screens/host_pairing_screen.cc

Issue 2705363002: cros: Move BaseScreenDelegate::ExitCodes into separate file, ScreenExitCode. (Closed)
Patch Set: Rebase Created 3 years, 9 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/screens/host_pairing_screen.h" 5 #include "chrome/browser/chromeos/login/screens/host_pairing_screen.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/chromeos/login/startup_utils.h" 9 #include "chrome/browser/chromeos/login/startup_utils.h"
10 #include "chrome/browser/chromeos/login/wizard_controller.h" 10 #include "chrome/browser/chromeos/login/wizard_controller.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 break; 92 break;
93 } 93 }
94 case HostPairingController::STAGE_ENROLLING: { 94 case HostPairingController::STAGE_ENROLLING: {
95 desired_page = kPageEnrollment; 95 desired_page = kPageEnrollment;
96 context_.SetString(kContextKeyEnrollmentDomain, 96 context_.SetString(kContextKeyEnrollmentDomain,
97 remora_controller_->GetEnrollmentDomain()); 97 remora_controller_->GetEnrollmentDomain());
98 break; 98 break;
99 } 99 }
100 case HostPairingController::STAGE_ENROLLMENT_SUCCESS: { 100 case HostPairingController::STAGE_ENROLLMENT_SUCCESS: {
101 remora_controller_->RemoveObserver(this); 101 remora_controller_->RemoveObserver(this);
102 Finish(WizardController::ENTERPRISE_ENROLLMENT_COMPLETED); 102 Finish(ScreenExitCode::ENTERPRISE_ENROLLMENT_COMPLETED);
103 break; 103 break;
104 } 104 }
105 case HostPairingController::STAGE_ENROLLMENT_ERROR: { 105 case HostPairingController::STAGE_ENROLLMENT_ERROR: {
106 // TODO(xdai): Maybe return to the Network Setup page? 106 // TODO(xdai): Maybe return to the Network Setup page?
107 remora_controller_->RemoveObserver(this); 107 remora_controller_->RemoveObserver(this);
108 desired_page = kPageEnrollmentError; 108 desired_page = kPageEnrollmentError;
109 break; 109 break;
110 } 110 }
111 default: 111 default:
112 break; 112 break;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } 193 }
194 194
195 void HostPairingScreen::OnAnyEnrollmentError() { 195 void HostPairingScreen::OnAnyEnrollmentError() {
196 enrollment_helper_->ClearAuth(base::Bind(&HostPairingScreen::OnAuthCleared, 196 enrollment_helper_->ClearAuth(base::Bind(&HostPairingScreen::OnAuthCleared,
197 weak_ptr_factory_.GetWeakPtr())); 197 weak_ptr_factory_.GetWeakPtr()));
198 remora_controller_->OnEnrollmentStatusChanged( 198 remora_controller_->OnEnrollmentStatusChanged(
199 HostPairingController::ENROLLMENT_STATUS_FAILURE); 199 HostPairingController::ENROLLMENT_STATUS_FAILURE);
200 } 200 }
201 201
202 } // namespace chromeos 202 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698