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

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

Issue 2677563005: Chromad: Use DM server reply to determine enrollment type (Closed)
Patch Set: comments+create ActiveDirectoryJoinDelegate Created 3 years, 10 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 #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"
11 #include "chrome/browser/chromeos/login/screens/host_pairing_screen_actor.h" 11 #include "chrome/browser/chromeos/login/screens/host_pairing_screen_actor.h"
12 #include "chrome/browser/chromeos/policy/active_directory_join_delegate.h"
12 #include "components/login/screens/screen_context.h" 13 #include "components/login/screens/screen_context.h"
13 #include "components/pairing/host_pairing_controller.h" 14 #include "components/pairing/host_pairing_controller.h"
14 15
15 namespace chromeos { 16 namespace chromeos {
16 17
17 class HostPairingScreen 18 class HostPairingScreen
18 : public BaseScreen, 19 : public BaseScreen,
19 public pairing_chromeos::HostPairingController::Observer, 20 public pairing_chromeos::HostPairingController::Observer,
20 public HostPairingScreenActor::Delegate, 21 public HostPairingScreenActor::Delegate,
21 public EnterpriseEnrollmentHelper::EnrollmentStatusConsumer { 22 public EnterpriseEnrollmentHelper::EnrollmentStatusConsumer,
23 public ActiveDirectoryJoinDelegate {
22 public: 24 public:
23 class Delegate { 25 class Delegate {
24 public: 26 public:
25 virtual ~Delegate() {} 27 virtual ~Delegate() {}
26 28
27 // Called when a configuration has been received, and should be applied to 29 // Called when a configuration has been received, and should be applied to
28 // this device. 30 // this device.
29 virtual void ConfigureHostRequested(bool accepted_eula, 31 virtual void ConfigureHostRequested(bool accepted_eula,
30 const std::string& lang, 32 const std::string& lang,
31 const std::string& timezone, 33 const std::string& timezone,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void OnEnrollmentError(policy::EnrollmentStatus status) override; 72 void OnEnrollmentError(policy::EnrollmentStatus status) override;
71 void OnOtherError(EnterpriseEnrollmentHelper::OtherError error) override; 73 void OnOtherError(EnterpriseEnrollmentHelper::OtherError error) override;
72 void OnDeviceEnrolled(const std::string& additional_token) override; 74 void OnDeviceEnrolled(const std::string& additional_token) override;
73 void OnDeviceAttributeUploadCompleted(bool success) override; 75 void OnDeviceAttributeUploadCompleted(bool success) override;
74 void OnDeviceAttributeUpdatePermission(bool granted) override; 76 void OnDeviceAttributeUpdatePermission(bool granted) override;
75 77
76 // Used as a callback for EnterpriseEnrollmentHelper::ClearAuth. 78 // Used as a callback for EnterpriseEnrollmentHelper::ClearAuth.
77 void OnAuthCleared(); 79 void OnAuthCleared();
78 void OnAnyEnrollmentError(); 80 void OnAnyEnrollmentError();
79 81
82 // Implements ActiveDirectoryJoinDelegate.
achuithb 2017/02/13 13:39:02 Use the same comment form as above for consistency
Roman Sorokin (ftl) 2017/02/14 12:47:10 Done.
83 void JoinDomain(OnDomainJoinedCallback on_joined_callback) override;
84
80 Delegate* delegate_; 85 Delegate* delegate_;
achuithb 2017/02/13 13:39:02 = nullptr
Roman Sorokin (ftl) 2017/02/14 12:47:10 Done.
81 86
82 HostPairingScreenActor* actor_; 87 HostPairingScreenActor* actor_;
achuithb 2017/02/13 13:39:02 = nullptr
Roman Sorokin (ftl) 2017/02/14 12:47:10 Done.
83 88
84 // Controller performing pairing. Owned by the wizard controller. 89 // Controller performing pairing. Owned by the wizard controller.
85 pairing_chromeos::HostPairingController* remora_controller_; 90 pairing_chromeos::HostPairingController* remora_controller_;
achuithb 2017/02/13 13:39:02 = nullptr
Roman Sorokin (ftl) 2017/02/14 12:47:10 Done.
86 91
87 std::unique_ptr<EnterpriseEnrollmentHelper> enrollment_helper_; 92 std::unique_ptr<EnterpriseEnrollmentHelper> enrollment_helper_;
88 93
89 // Current stage of pairing process. 94 // Current stage of pairing process.
90 Stage current_stage_; 95 Stage current_stage_;
achuithb 2017/02/13 13:39:02 = STAGE_NONE
Roman Sorokin (ftl) 2017/02/14 12:47:10 Done.
91 96
92 base::WeakPtrFactory<HostPairingScreen> weak_ptr_factory_; 97 base::WeakPtrFactory<HostPairingScreen> weak_ptr_factory_;
93 98
94 DISALLOW_COPY_AND_ASSIGN(HostPairingScreen); 99 DISALLOW_COPY_AND_ASSIGN(HostPairingScreen);
95 }; 100 };
96 101
97 } // namespace chromeos 102 } // namespace chromeos
98 103
99 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_ 104 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698