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

Side by Side Diff: chrome/browser/chromeos/login/enterprise_enrollment_screen.h

Issue 7562008: Add new version of enrollment screen supporting OAuth. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_ENTERPRISE_ENROLLMENT_SCREEN_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENTERPRISE_ENROLLMENT_SCREEN_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENTERPRISE_ENROLLMENT_SCREEN_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENTERPRISE_ENROLLMENT_SCREEN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 26 matching lines...) Expand all
37 // WizardScreen implementation: 37 // WizardScreen implementation:
38 virtual void PrepareToShow() OVERRIDE; 38 virtual void PrepareToShow() OVERRIDE;
39 virtual void Show() OVERRIDE; 39 virtual void Show() OVERRIDE;
40 virtual void Hide() OVERRIDE; 40 virtual void Hide() OVERRIDE;
41 41
42 // EnterpriseEnrollmentScreenActor::Controller implementation: 42 // EnterpriseEnrollmentScreenActor::Controller implementation:
43 virtual void OnAuthSubmitted(const std::string& user, 43 virtual void OnAuthSubmitted(const std::string& user,
44 const std::string& password, 44 const std::string& password,
45 const std::string& captcha, 45 const std::string& captcha,
46 const std::string& access_code) OVERRIDE; 46 const std::string& access_code) OVERRIDE;
47 virtual void OnOAuthTokenAvailable(const std::string& user,
48 const std::string& token) OVERRIDE;
47 virtual void OnAuthCancelled() OVERRIDE; 49 virtual void OnAuthCancelled() OVERRIDE;
48 virtual void OnConfirmationClosed() OVERRIDE; 50 virtual void OnConfirmationClosed() OVERRIDE;
49 virtual bool GetInitialUser(std::string* user) OVERRIDE; 51 virtual bool GetInitialUser(std::string* user) OVERRIDE;
50 52
51 // GaiaAuthConsumer implementation: 53 // GaiaAuthConsumer implementation:
52 virtual void OnClientLoginSuccess(const ClientLoginResult& result) OVERRIDE; 54 virtual void OnClientLoginSuccess(const ClientLoginResult& result) OVERRIDE;
53 virtual void OnClientLoginFailure( 55 virtual void OnClientLoginFailure(
54 const GoogleServiceAuthError& error) OVERRIDE; 56 const GoogleServiceAuthError& error) OVERRIDE;
55 57
56 virtual void OnIssueAuthTokenSuccess(const std::string& service, 58 virtual void OnIssueAuthTokenSuccess(const std::string& service,
(...skipping 11 matching lines...) Expand all
68 EnterpriseEnrollmentScreenActor* GetActor() { 70 EnterpriseEnrollmentScreenActor* GetActor() {
69 return actor_; 71 return actor_;
70 } 72 }
71 73
72 private: 74 private:
73 void HandleAuthError(const GoogleServiceAuthError& error); 75 void HandleAuthError(const GoogleServiceAuthError& error);
74 76
75 // Starts the Lockbox storage process. 77 // Starts the Lockbox storage process.
76 void WriteInstallAttributesData(); 78 void WriteInstallAttributesData();
77 79
80 // Kicks of the policy infrastructure to register with the service. Either
pastarmovj 2011/08/03 15:01:56 s/of/off/
Mattias Nissler (ping if slow) 2011/08/04 09:58:59 Done.
81 // |gaia_auth_token| or |oauth_token| should be provided, the other one should
82 // be empty.
83 void RegisterForDevicePolicy(const std::string& gaia_auth_token,
whywhat 2011/08/03 17:48:03 optional: maybe instead pass one string token and
Mattias Nissler (ping if slow) 2011/08/04 09:58:59 Done.
84 const std::string& oauth_token);
85
78 EnterpriseEnrollmentScreenActor* actor_; 86 EnterpriseEnrollmentScreenActor* actor_;
79 bool is_showing_; 87 bool is_showing_;
80 scoped_ptr<GaiaAuthFetcher> auth_fetcher_; 88 scoped_ptr<GaiaAuthFetcher> auth_fetcher_;
81 std::string user_; 89 std::string user_;
82 std::string captcha_token_; 90 std::string captcha_token_;
83 scoped_ptr<policy::CloudPolicySubsystem::ObserverRegistrar> registrar_; 91 scoped_ptr<policy::CloudPolicySubsystem::ObserverRegistrar> registrar_;
84 ScopedRunnableMethodFactory<EnterpriseEnrollmentScreen> 92 ScopedRunnableMethodFactory<EnterpriseEnrollmentScreen>
85 runnable_method_factory_; 93 runnable_method_factory_;
86 94
87 DISALLOW_COPY_AND_ASSIGN(EnterpriseEnrollmentScreen); 95 DISALLOW_COPY_AND_ASSIGN(EnterpriseEnrollmentScreen);
88 }; 96 };
89 97
90 } // namespace chromeos 98 } // namespace chromeos
91 99
92 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENTERPRISE_ENROLLMENT_SCREEN_H_ 100 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENTERPRISE_ENROLLMENT_SCREEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698