OLD | NEW |
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_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 bool confirm_untrusted_signin); | 163 bool confirm_untrusted_signin); |
164 ~InlineSigninHelper() override; | 164 ~InlineSigninHelper() override; |
165 | 165 |
166 private: | 166 private: |
167 // Handles cross account sign in error. If the supplied |email| does not match | 167 // Handles cross account sign in error. If the supplied |email| does not match |
168 // the last signed in email of the current profile, then Chrome will show a | 168 // the last signed in email of the current profile, then Chrome will show a |
169 // confirmation dialog before starting sync. It returns true if there is a | 169 // confirmation dialog before starting sync. It returns true if there is a |
170 // cross account error, and false otherwise. | 170 // cross account error, and false otherwise. |
171 bool HandleCrossAccountError( | 171 bool HandleCrossAccountError( |
172 const std::string& refresh_token, | 172 const std::string& refresh_token, |
173 signin_metrics::Source source, | |
174 OneClickSigninSyncStarter::ConfirmationRequired confirmation_required, | 173 OneClickSigninSyncStarter::ConfirmationRequired confirmation_required, |
175 OneClickSigninSyncStarter::StartSyncMode start_mode); | 174 OneClickSigninSyncStarter::StartSyncMode start_mode); |
176 | 175 |
177 // Callback used with ConfirmEmailDialogDelegate. | 176 // Callback used with ConfirmEmailDialogDelegate. |
178 void ConfirmEmailAction( | 177 void ConfirmEmailAction( |
179 content::WebContents* web_contents, | 178 content::WebContents* web_contents, |
180 const std::string& refresh_token, | 179 const std::string& refresh_token, |
181 signin_metrics::Source source, | |
182 OneClickSigninSyncStarter::ConfirmationRequired confirmation_required, | 180 OneClickSigninSyncStarter::ConfirmationRequired confirmation_required, |
183 OneClickSigninSyncStarter::StartSyncMode start_mode, | 181 OneClickSigninSyncStarter::StartSyncMode start_mode, |
184 Action action); | 182 Action action); |
185 | 183 |
186 // Overridden from GaiaAuthConsumer. | 184 // Overridden from GaiaAuthConsumer. |
187 void OnClientOAuthSuccess(const ClientOAuthResult& result) override; | 185 void OnClientOAuthSuccess(const ClientOAuthResult& result) override; |
188 void OnClientOAuthFailure(const GoogleServiceAuthError& error) | 186 void OnClientOAuthFailure(const GoogleServiceAuthError& error) |
189 override; | 187 override; |
190 | 188 |
191 // Creates the sync starter. Virtual for tests. Call to exchange oauth code | 189 // Creates the sync starter. Virtual for tests. Call to exchange oauth code |
(...skipping 15 matching lines...) Expand all Loading... |
207 std::string password_; | 205 std::string password_; |
208 std::string session_index_; | 206 std::string session_index_; |
209 std::string auth_code_; | 207 std::string auth_code_; |
210 bool choose_what_to_sync_; | 208 bool choose_what_to_sync_; |
211 bool confirm_untrusted_signin_; | 209 bool confirm_untrusted_signin_; |
212 | 210 |
213 DISALLOW_COPY_AND_ASSIGN(InlineSigninHelper); | 211 DISALLOW_COPY_AND_ASSIGN(InlineSigninHelper); |
214 }; | 212 }; |
215 | 213 |
216 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_ | 214 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_ |
OLD | NEW |