| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // child/route id. | 34 // child/route id. |
| 35 static void ShowInfoBarIfPossible(net::URLRequest* request, | 35 static void ShowInfoBarIfPossible(net::URLRequest* request, |
| 36 int child_id, | 36 int child_id, |
| 37 int route_id); | 37 int route_id); |
| 38 | 38 |
| 39 explicit OneClickSigninHelper(content::WebContents* web_contents); | 39 explicit OneClickSigninHelper(content::WebContents* web_contents); |
| 40 virtual ~OneClickSigninHelper(); | 40 virtual ~OneClickSigninHelper(); |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 // The portion of ShowInfoBarIfPossible() that needs to run on the UI thread. | 43 // The portion of ShowInfoBarIfPossible() that needs to run on the UI thread. |
| 44 static void ShowInfoBarUIThread(const std::string& account, | 44 static void ShowInfoBarUIThread(const std::string& session_index, |
| 45 const std::string& email, |
| 45 int child_id, | 46 int child_id, |
| 46 int route_id); | 47 int route_id); |
| 47 | 48 |
| 48 // content::WebContentsObserver overrides. | 49 // content::WebContentsObserver overrides. |
| 49 virtual void DidNavigateAnyFrame( | 50 virtual void DidNavigateAnyFrame( |
| 50 const content::LoadCommittedDetails& details, | 51 const content::LoadCommittedDetails& details, |
| 51 const content::FrameNavigateParams& params) OVERRIDE; | 52 const content::FrameNavigateParams& params) OVERRIDE; |
| 52 virtual void DidStopLoading() OVERRIDE; | 53 virtual void DidStopLoading() OVERRIDE; |
| 53 | 54 |
| 54 // Save the email address that we can display the info bar correctly. | 55 // Save the email address that we can display the info bar correctly. |
| 55 void SaveEmail(const std::string& email); | 56 void SaveSessionIndexAndEmail(const std::string& session_index, |
| 57 const std::string& email); |
| 56 | 58 |
| 57 // Remember the user's password for later use. | 59 // Remember the user's password for later use. |
| 58 void SavePassword(const std::string& password); | 60 void SavePassword(const std::string& password); |
| 59 | 61 |
| 60 // Email address and password of the account that has just logged in. | 62 // Information about the account that has just logged in. |
| 63 std::string session_index_; |
| 61 std::string email_; | 64 std::string email_; |
| 62 std::string password_; | 65 std::string password_; |
| 63 | 66 |
| 64 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper); | 67 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper); |
| 65 }; | 68 }; |
| 66 | 69 |
| 67 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ | 70 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ |
| OLD | NEW |