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 "chrome/browser/common/web_contents_user_data.h" | 10 #include "chrome/browser/common/web_contents_user_data.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 // Looks for the Google-Accounts-SignIn response header, and if found, | 44 // Looks for the Google-Accounts-SignIn response header, and if found, |
45 // tries to display an infobar in the tab contents identified by the | 45 // tries to display an infobar in the tab contents identified by the |
46 // child/route id. | 46 // child/route id. |
47 static void ShowInfoBarIfPossible(net::URLRequest* request, | 47 static void ShowInfoBarIfPossible(net::URLRequest* request, |
48 int child_id, | 48 int child_id, |
49 int route_id); | 49 int route_id); |
50 | 50 |
51 private: | 51 private: |
52 explicit OneClickSigninHelper(content::WebContents* web_contents); | 52 explicit OneClickSigninHelper(content::WebContents* web_contents); |
53 static int kUserDataKey; | |
54 friend class WebContentsUserData<OneClickSigninHelper>; | 53 friend class WebContentsUserData<OneClickSigninHelper>; |
55 | 54 |
56 // The portion of ShowInfoBarIfPossible() that needs to run on the UI thread. | 55 // The portion of ShowInfoBarIfPossible() that needs to run on the UI thread. |
57 static void ShowInfoBarUIThread(const std::string& session_index, | 56 static void ShowInfoBarUIThread(const std::string& session_index, |
58 const std::string& email, | 57 const std::string& email, |
59 int child_id, | 58 int child_id, |
60 int route_id); | 59 int route_id); |
61 | 60 |
62 // content::WebContentsObserver overrides. | 61 // content::WebContentsObserver overrides. |
63 virtual void DidNavigateAnyFrame( | 62 virtual void DidNavigateAnyFrame( |
(...skipping 11 matching lines...) Expand all Loading... |
75 | 74 |
76 // Information about the account that has just logged in. | 75 // Information about the account that has just logged in. |
77 std::string session_index_; | 76 std::string session_index_; |
78 std::string email_; | 77 std::string email_; |
79 std::string password_; | 78 std::string password_; |
80 | 79 |
81 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper); | 80 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper); |
82 }; | 81 }; |
83 | 82 |
84 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ | 83 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ |
OLD | NEW |