| OLD | NEW |
| 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_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ |
| 6 #define CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ | 6 #define CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 int child_id, | 189 int child_id, |
| 190 int route_id); | 190 int route_id); |
| 191 | 191 |
| 192 void RedirectToNtpOrAppsPage(); | 192 void RedirectToNtpOrAppsPage(); |
| 193 void RedirectToSignin(); | 193 void RedirectToSignin(); |
| 194 void ShowSigninErrorBubble(Browser* browser, const std::string& error); | 194 void ShowSigninErrorBubble(Browser* browser, const std::string& error); |
| 195 | 195 |
| 196 // Clear all data member of the helper, except for the error. | 196 // Clear all data member of the helper, except for the error. |
| 197 void CleanTransientState(); | 197 void CleanTransientState(); |
| 198 | 198 |
| 199 // Unitests that use a TestingProfile should call this. |
| 200 // Otherwise, clearing the pending e-mail crashes because the code expects |
| 201 // a real ResourceContext rather than the MockResourceContext a |
| 202 // TestingProfile provides. |
| 203 void SetDoNotClearPendingEmailForTesting(); |
| 204 |
| 199 // Grab Gaia password if available. | 205 // Grab Gaia password if available. |
| 200 bool OnFormSubmitted(const content::PasswordForm& form); | 206 bool OnFormSubmitted(const content::PasswordForm& form); |
| 201 | 207 |
| 202 // content::WebContentsObserver overrides. | 208 // content::WebContentsObserver overrides. |
| 203 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 209 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 204 virtual void NavigateToPendingEntry( | 210 virtual void NavigateToPendingEntry( |
| 205 const GURL& url, | 211 const GURL& url, |
| 206 content::NavigationController::ReloadType reload_type) OVERRIDE; | 212 content::NavigationController::ReloadType reload_type) OVERRIDE; |
| 207 virtual void DidStopLoading( | 213 virtual void DidStopLoading( |
| 208 content::RenderViewHost* render_view_host) OVERRIDE; | 214 content::RenderViewHost* render_view_host) OVERRIDE; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 235 // one more untrusted will cause a modal dialog to appear asking the user | 241 // one more untrusted will cause a modal dialog to appear asking the user |
| 236 // to confirm, similar to the interstitial flow. | 242 // to confirm, similar to the interstitial flow. |
| 237 int untrusted_navigations_since_signin_visit_; | 243 int untrusted_navigations_since_signin_visit_; |
| 238 | 244 |
| 239 // Whether a Gaia URL during the sign in process was not handled by the | 245 // Whether a Gaia URL during the sign in process was not handled by the |
| 240 // dedicated sign in process (e.g. SAML login, which redirects to a | 246 // dedicated sign in process (e.g. SAML login, which redirects to a |
| 241 // non-google-controlled domain). | 247 // non-google-controlled domain). |
| 242 // This is set to true if at least one such URL is detected. | 248 // This is set to true if at least one such URL is detected. |
| 243 bool untrusted_confirmation_required_; | 249 bool untrusted_confirmation_required_; |
| 244 | 250 |
| 251 // Allows unittests to avoid accessing the ResourceContext for clearing a |
| 252 // pending e-mail. |
| 253 bool do_not_clear_pending_email_; |
| 254 |
| 245 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper); | 255 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper); |
| 246 }; | 256 }; |
| 247 | 257 |
| 248 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ | 258 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ |
| OLD | NEW |