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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h

Issue 1138143002: Pass Device ID in the oauth2/token request. Keep Device ID in local state on Chrome OS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comment. Created 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 // True if user list is non-empty. 47 // True if user list is non-empty.
48 bool has_users; 48 bool has_users;
49 49
50 // Email of the current user. 50 // Email of the current user.
51 std::string email; 51 std::string email;
52 52
53 // GAIA ID of the current user. 53 // GAIA ID of the current user.
54 std::string gaia_id; 54 std::string gaia_id;
55 55
56 // Device Id of the current user.
57 std::string device_id;
58
59 // Whether consumer management enrollment is in progress. 56 // Whether consumer management enrollment is in progress.
60 bool is_enrolling_consumer_management; 57 bool is_enrolling_consumer_management;
61
62 // If user session would be ephemeral.
63 bool session_is_ephemeral;
64 }; 58 };
65 59
66 // A class that handles WebUI hooks in Gaia screen. 60 // A class that handles WebUI hooks in Gaia screen.
67 class GaiaScreenHandler : public BaseScreenHandler { 61 class GaiaScreenHandler : public BaseScreenHandler {
68 public: 62 public:
69 enum FrameState { 63 enum FrameState {
70 FRAME_STATE_UNKNOWN = 0, 64 FRAME_STATE_UNKNOWN = 0,
71 FRAME_STATE_LOADING, 65 FRAME_STATE_LOADING,
72 FRAME_STATE_LOADED, 66 FRAME_STATE_LOADED,
73 FRAME_STATE_ERROR 67 FRAME_STATE_ERROR
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // WebUIMessageHandler implementation: 108 // WebUIMessageHandler implementation:
115 void RegisterMessages() override; 109 void RegisterMessages() override;
116 110
117 // WebUI message handlers. 111 // WebUI message handlers.
118 void HandleFrameLoadingCompleted(int status); 112 void HandleFrameLoadingCompleted(int status);
119 void HandleWebviewLoadAborted(const std::string& error_reason_str); 113 void HandleWebviewLoadAborted(const std::string& error_reason_str);
120 void HandleCompleteAuthentication(const std::string& gaia_id, 114 void HandleCompleteAuthentication(const std::string& gaia_id,
121 const std::string& email, 115 const std::string& email,
122 const std::string& password, 116 const std::string& password,
123 const std::string& auth_code, 117 const std::string& auth_code,
124 bool using_saml, 118 bool using_saml);
125 const std::string& device_id);
126 void HandleCompleteAuthenticationAuthCodeOnly(const std::string& auth_code); 119 void HandleCompleteAuthenticationAuthCodeOnly(const std::string& auth_code);
127 void HandleCompleteLogin(const std::string& gaia_id, 120 void HandleCompleteLogin(const std::string& gaia_id,
128 const std::string& typed_email, 121 const std::string& typed_email,
129 const std::string& password, 122 const std::string& password,
130 bool using_saml); 123 bool using_saml);
131 124
132 void HandleUsingSAMLAPI(); 125 void HandleUsingSAMLAPI();
133 void HandleScrapedPasswordCount(int password_count); 126 void HandleScrapedPasswordCount(int password_count);
134 void HandleScrapedPasswordVerificationFailed(); 127 void HandleScrapedPasswordVerificationFailed();
135 128
136 void HandleGaiaUIReady(); 129 void HandleGaiaUIReady();
137 130
138 void HandleToggleEasyBootstrap(); 131 void HandleToggleEasyBootstrap();
139 132
140 void HandleAttemptLogin(const std::string& email);
141
142 void HandleToggleWebviewSignin(); 133 void HandleToggleWebviewSignin();
143 134
144 // This is called when ConsumerManagementService::SetOwner() returns. 135 // This is called when ConsumerManagementService::SetOwner() returns.
145 void OnSetOwnerDone(const std::string& gaia_id, 136 void OnSetOwnerDone(const std::string& gaia_id,
146 const std::string& typed_email, 137 const std::string& typed_email,
147 const std::string& password, 138 const std::string& password,
148 bool using_saml, 139 bool using_saml,
149 bool success); 140 bool success);
150 141
151 // Really handles the complete login message. 142 // Really handles the complete login message.
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 261
271 // Non-owning ptr to SigninScreenHandler instance. Should not be used 262 // Non-owning ptr to SigninScreenHandler instance. Should not be used
272 // in dtor. 263 // in dtor.
273 // TODO (antrim@): GaiaScreenHandler shouldn't communicate with 264 // TODO (antrim@): GaiaScreenHandler shouldn't communicate with
274 // signin_screen_handler directly. 265 // signin_screen_handler directly.
275 SigninScreenHandler* signin_screen_handler_; 266 SigninScreenHandler* signin_screen_handler_;
276 267
277 // GAIA extension loader. 268 // GAIA extension loader.
278 scoped_ptr<ScopedGaiaAuthExtension> auth_extension_; 269 scoped_ptr<ScopedGaiaAuthExtension> auth_extension_;
279 270
280 // Temporary DeviceId to be used for new users.
281 // If it's empty, new deviceId should be generated.
282 std::string temporary_device_id_;
283
284 base::WeakPtrFactory<GaiaScreenHandler> weak_factory_; 271 base::WeakPtrFactory<GaiaScreenHandler> weak_factory_;
285 272
286 DISALLOW_COPY_AND_ASSIGN(GaiaScreenHandler); 273 DISALLOW_COPY_AND_ASSIGN(GaiaScreenHandler);
287 }; 274 };
288 275
289 } // namespace chromeos 276 } // namespace chromeos
290 277
291 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ 278 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/signin/chrome_signin_client.cc ('k') | chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698