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

Side by Side Diff: chrome/browser/chromeos/login/enrollment/enterprise_enrollment_screen_actor.h

Issue 10664017: Introduce a new error code from the DM server - 402 - missing licenses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_SCREEN_AC TOR_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_SCREEN_AC TOR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_SCREEN_AC TOR_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_SCREEN_AC TOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/observer_list.h" 11 #include "base/observer_list.h"
12 12
13 class GoogleServiceAuthError; 13 class GoogleServiceAuthError;
14 14
15 namespace chromeos { 15 namespace chromeos {
16 16
17 // Interface class for the enterprise enrollment screen actor. 17 // Interface class for the enterprise enrollment screen actor.
18 class EnterpriseEnrollmentScreenActor { 18 class EnterpriseEnrollmentScreenActor {
19 public: 19 public:
20 // Enumeration of the possible errors that can occur during enrollment.
21 enum EnrollmentError {
22 ACCOUNT_ERROR,
23 SERIAL_NUMBER_ERROR,
24 ENROLLMENT_MODE_ERROR,
25 FATAL_AUTH_ERROR,
26 FATAL_ENROLLMENT_ERROR,
Mattias Nissler (ping if slow) 2012/06/26 09:19:34 _ENROLLMENT_ seems redundant to me.
pastarmovj 2012/06/26 16:59:29 Done.
27 AUTO_ENROLLMENT_ERROR,
28 NETWORK_ENROLLMENT_ERROR,
Mattias Nissler (ping if slow) 2012/06/26 09:19:34 same here
pastarmovj 2012/06/26 16:59:29 Done.
29 LOCKBOX_TIMEOUT_ERROR,
30 DOMAIN_MISMATCH_ERROR,
31 MISSING_LICESES_ERROR,
Nikita (slow) 2012/06/26 10:37:34 *LICENSES
pastarmovj 2012/06/26 16:59:29 Done.
32 };
33
20 // This defines the interface for controllers which will be called back when 34 // This defines the interface for controllers which will be called back when
21 // something happens on the UI. 35 // something happens on the UI.
22 class Controller { 36 class Controller {
23 public: 37 public:
24 virtual ~Controller() {} 38 virtual ~Controller() {}
25 39
26 virtual void OnOAuthTokenAvailable(const std::string& user, 40 virtual void OnOAuthTokenAvailable(const std::string& user,
27 const std::string& oauth_token) = 0; 41 const std::string& oauth_token) = 0;
28 virtual void OnConfirmationClosed(bool go_back_to_signin) = 0; 42 virtual void OnConfirmationClosed(bool go_back_to_signin) = 0;
29 virtual bool IsAutoEnrollment(std::string* user) = 0; 43 virtual bool IsAutoEnrollment(std::string* user) = 0;
(...skipping 28 matching lines...) Expand all
58 virtual void Show() = 0; 72 virtual void Show() = 0;
59 73
60 // Hides the contents of the screen. 74 // Hides the contents of the screen.
61 virtual void Hide() = 0; 75 virtual void Hide() = 0;
62 76
63 // Switches to the confirmation screen. 77 // Switches to the confirmation screen.
64 virtual void ShowConfirmationScreen() = 0; 78 virtual void ShowConfirmationScreen() = 0;
65 79
66 // Show an authentication error. 80 // Show an authentication error.
67 virtual void ShowAuthError(const GoogleServiceAuthError& error) = 0; 81 virtual void ShowAuthError(const GoogleServiceAuthError& error) = 0;
68 virtual void ShowAccountError() = 0; 82
69 virtual void ShowSerialNumberError() = 0; 83 // Show non-authentication error.
70 virtual void ShowEnrollmentModeError() = 0; 84 virtual void ShowEnrollmentError(EnrollmentError error_code) = 0;
71 virtual void ShowFatalAuthError() = 0;
72 virtual void ShowFatalEnrollmentError() = 0;
73 virtual void ShowAutoEnrollmentError() = 0;
74 virtual void ShowNetworkEnrollmentError() = 0;
75 virtual void ShowLockboxTimeoutError() = 0;
76 virtual void ShowDomainMismatchError() = 0;
77 85
78 // Used for testing only. 86 // Used for testing only.
79 virtual void SubmitTestCredentials(const std::string& email, 87 virtual void SubmitTestCredentials(const std::string& email,
80 const std::string& password) = 0; 88 const std::string& password) = 0;
81 89
82 protected: 90 protected:
83 void NotifyObservers(bool succeeded); 91 void NotifyObservers(bool succeeded);
84 92
85 private: 93 private:
86 // Observers. 94 // Observers.
87 ObserverList<Observer> observer_list_; 95 ObserverList<Observer> observer_list_;
88 }; 96 };
89 97
90 } // namespace chromeos 98 } // namespace chromeos
91 99
92 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_SCREEN _ACTOR_H_ 100 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_SCREEN _ACTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698