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

Side by Side Diff: chrome/browser/chromeos/login/enrollment/auto_enrollment_check_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/enrollment/auto_enrollment_check_screen. h" 5 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen. 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/command_line.h" 9 #include "base/command_line.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 void AutoEnrollmentCheckScreen::SignalCompletion() { 242 void AutoEnrollmentCheckScreen::SignalCompletion() {
243 network_portal_detector::GetInstance()->RemoveObserver(this); 243 network_portal_detector::GetInstance()->RemoveObserver(this);
244 auto_enrollment_progress_subscription_.reset(); 244 auto_enrollment_progress_subscription_.reset();
245 connect_request_subscription_.reset(); 245 connect_request_subscription_.reset();
246 246
247 // Calling Finish() can cause |this| destruction, so let other methods finish 247 // Calling Finish() can cause |this| destruction, so let other methods finish
248 // their work before. 248 // their work before.
249 base::ThreadTaskRunnerHandle::Get()->PostTask( 249 base::ThreadTaskRunnerHandle::Get()->PostTask(
250 FROM_HERE, 250 FROM_HERE,
251 base::Bind( 251 base::Bind(&AutoEnrollmentCheckScreen::Finish,
252 &AutoEnrollmentCheckScreen::Finish, weak_ptr_factory_.GetWeakPtr(), 252 weak_ptr_factory_.GetWeakPtr(),
253 BaseScreenDelegate::ENTERPRISE_AUTO_ENROLLMENT_CHECK_COMPLETED)); 253 ScreenExitCode::ENTERPRISE_AUTO_ENROLLMENT_CHECK_COMPLETED));
254 } 254 }
255 255
256 bool AutoEnrollmentCheckScreen::IsCompleted() const { 256 bool AutoEnrollmentCheckScreen::IsCompleted() const {
257 switch (auto_enrollment_controller_->state()) { 257 switch (auto_enrollment_controller_->state()) {
258 case policy::AUTO_ENROLLMENT_STATE_IDLE: 258 case policy::AUTO_ENROLLMENT_STATE_IDLE:
259 case policy::AUTO_ENROLLMENT_STATE_PENDING: 259 case policy::AUTO_ENROLLMENT_STATE_PENDING:
260 case policy::AUTO_ENROLLMENT_STATE_CONNECTION_ERROR: 260 case policy::AUTO_ENROLLMENT_STATE_CONNECTION_ERROR:
261 return false; 261 return false;
262 case policy::AUTO_ENROLLMENT_STATE_SERVER_ERROR: 262 case policy::AUTO_ENROLLMENT_STATE_SERVER_ERROR:
263 // Server errors don't block OOBE. 263 // Server errors don't block OOBE.
264 case policy::AUTO_ENROLLMENT_STATE_TRIGGER_ENROLLMENT: 264 case policy::AUTO_ENROLLMENT_STATE_TRIGGER_ENROLLMENT:
265 case policy::AUTO_ENROLLMENT_STATE_NO_ENROLLMENT: 265 case policy::AUTO_ENROLLMENT_STATE_NO_ENROLLMENT:
266 // Decision made, ready to proceed. 266 // Decision made, ready to proceed.
267 return true; 267 return true;
268 } 268 }
269 NOTREACHED(); 269 NOTREACHED();
270 return false; 270 return false;
271 } 271 }
272 272
273 void AutoEnrollmentCheckScreen::OnConnectRequested() { 273 void AutoEnrollmentCheckScreen::OnConnectRequested() {
274 auto_enrollment_controller_->Retry(); 274 auto_enrollment_controller_->Retry();
275 } 275 }
276 276
277 } // namespace chromeos 277 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/BUILD.gn ('k') | chrome/browser/chromeos/login/enrollment/enrollment_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698