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

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

Issue 2901653002: Bootstrapping: Reboot on enrollment failure (Closed)
Patch Set: Fixed comments. Created 3 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screens/host_pairing_screen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper. h" 9 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper. h"
10 #include "chrome/browser/chromeos/login/screens/base_screen.h" 10 #include "chrome/browser/chromeos/login/screens/base_screen.h"
(...skipping 17 matching lines...) Expand all
28 // this device. 28 // this device.
29 virtual void ConfigureHostRequested(bool accepted_eula, 29 virtual void ConfigureHostRequested(bool accepted_eula,
30 const std::string& lang, 30 const std::string& lang,
31 const std::string& timezone, 31 const std::string& timezone,
32 bool send_reports, 32 bool send_reports,
33 const std::string& keyboard_layout) = 0; 33 const std::string& keyboard_layout) = 0;
34 34
35 // Called when a network configuration has been received, and should be 35 // Called when a network configuration has been received, and should be
36 // used on this device. 36 // used on this device.
37 virtual void AddNetworkRequested(const std::string& onc_spec) = 0; 37 virtual void AddNetworkRequested(const std::string& onc_spec) = 0;
38
39 // Called when a reboot message has been received, and should reboot this
40 // device.
41 virtual void RebootHostRequested() = 0;
38 }; 42 };
39 43
40 HostPairingScreen(BaseScreenDelegate* base_screen_delegate, 44 HostPairingScreen(BaseScreenDelegate* base_screen_delegate,
41 Delegate* delegate, 45 Delegate* delegate,
42 HostPairingScreenView* view, 46 HostPairingScreenView* view,
43 pairing_chromeos::HostPairingController* remora_controller); 47 pairing_chromeos::HostPairingController* remora_controller);
44 ~HostPairingScreen() override; 48 ~HostPairingScreen() override;
45 49
46 private: 50 private:
47 typedef pairing_chromeos::HostPairingController::Stage Stage; 51 typedef pairing_chromeos::HostPairingController::Stage Stage;
48 52
49 void CommitContextChanges(); 53 void CommitContextChanges();
50 54
51 // Overridden from BaseScreen: 55 // Overridden from BaseScreen:
52 void Show() override; 56 void Show() override;
53 void Hide() override; 57 void Hide() override;
54 58
55 // pairing_chromeos::HostPairingController::Observer: 59 // pairing_chromeos::HostPairingController::Observer:
56 void PairingStageChanged(Stage new_stage) override; 60 void PairingStageChanged(Stage new_stage) override;
57 void ConfigureHostRequested(bool accepted_eula, 61 void ConfigureHostRequested(bool accepted_eula,
58 const std::string& lang, 62 const std::string& lang,
59 const std::string& timezone, 63 const std::string& timezone,
60 bool send_reports, 64 bool send_reports,
61 const std::string& keyboard_layout) override; 65 const std::string& keyboard_layout) override;
62 void AddNetworkRequested(const std::string& onc_spec) override; 66 void AddNetworkRequested(const std::string& onc_spec) override;
63 void EnrollHostRequested(const std::string& auth_token) override; 67 void EnrollHostRequested(const std::string& auth_token) override;
68 void RebootHostRequested() override;
64 69
65 // Overridden from ControllerPairingView::Delegate: 70 // Overridden from ControllerPairingView::Delegate:
66 void OnViewDestroyed(HostPairingScreenView* view) override; 71 void OnViewDestroyed(HostPairingScreenView* view) override;
67 72
68 // Overridden from EnterpriseEnrollmentHelper::EnrollmentStatusConsumer: 73 // Overridden from EnterpriseEnrollmentHelper::EnrollmentStatusConsumer:
69 void OnAuthError(const GoogleServiceAuthError& error) override; 74 void OnAuthError(const GoogleServiceAuthError& error) override;
70 void OnEnrollmentError(policy::EnrollmentStatus status) override; 75 void OnEnrollmentError(policy::EnrollmentStatus status) override;
71 void OnOtherError(EnterpriseEnrollmentHelper::OtherError error) override; 76 void OnOtherError(EnterpriseEnrollmentHelper::OtherError error) override;
72 void OnDeviceEnrolled(const std::string& additional_token) override; 77 void OnDeviceEnrolled(const std::string& additional_token) override;
73 void OnDeviceAttributeUploadCompleted(bool success) override; 78 void OnDeviceAttributeUploadCompleted(bool success) override;
(...skipping 17 matching lines...) Expand all
91 Stage current_stage_ = pairing_chromeos::HostPairingController::STAGE_NONE; 96 Stage current_stage_ = pairing_chromeos::HostPairingController::STAGE_NONE;
92 97
93 base::WeakPtrFactory<HostPairingScreen> weak_ptr_factory_; 98 base::WeakPtrFactory<HostPairingScreen> weak_ptr_factory_;
94 99
95 DISALLOW_COPY_AND_ASSIGN(HostPairingScreen); 100 DISALLOW_COPY_AND_ASSIGN(HostPairingScreen);
96 }; 101 };
97 102
98 } // namespace chromeos 103 } // namespace chromeos
99 104
100 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_ 105 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screens/host_pairing_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698