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 "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
(...skipping 16 matching lines...) Expand all Loading... | |
27 // Returns true if the one-click signin feature can be offered at this time. | 27 // Returns true if the one-click signin feature can be offered at this time. |
28 // It can be offered if the contents is not in an incognito window. If | 28 // It can be offered if the contents is not in an incognito window. If |
29 // |check_connected| is true, then the profile is checked to see if it's | 29 // |check_connected| is true, then the profile is checked to see if it's |
30 // already connected to a google account or if the user has already rejected | 30 // already connected to a google account or if the user has already rejected |
31 // one-click sign-in with this email, in which cases a one click signin | 31 // one-click sign-in with this email, in which cases a one click signin |
32 // should not be offered. | 32 // should not be offered. |
33 static bool CanOffer(content::WebContents* web_contents, | 33 static bool CanOffer(content::WebContents* web_contents, |
34 const std::string& email, | 34 const std::string& email, |
35 bool check_connected); | 35 bool check_connected); |
36 | 36 |
37 // Initialize a finch experiment for the infobar. | |
38 static void InitializeFieldTrial(); | |
Peter Kasting
2012/09/11 23:02:07
Random drive-by nit: The Google style guide says s
Roger Tawa OOO till Jul 10th
2012/09/12 15:07:14
Done.
| |
39 | |
37 // Looks for the Google-Accounts-SignIn response header, and if found, | 40 // Looks for the Google-Accounts-SignIn response header, and if found, |
38 // tries to display an infobar in the tab contents identified by the | 41 // tries to display an infobar in the tab contents identified by the |
39 // child/route id. | 42 // child/route id. |
40 static void ShowInfoBarIfPossible(net::URLRequest* request, | 43 static void ShowInfoBarIfPossible(net::URLRequest* request, |
41 int child_id, | 44 int child_id, |
42 int route_id); | 45 int route_id); |
43 | 46 |
44 explicit OneClickSigninHelper(content::WebContents* web_contents); | 47 explicit OneClickSigninHelper(content::WebContents* web_contents); |
45 virtual ~OneClickSigninHelper(); | 48 virtual ~OneClickSigninHelper(); |
46 | 49 |
(...skipping 20 matching lines...) Expand all Loading... | |
67 | 70 |
68 // Information about the account that has just logged in. | 71 // Information about the account that has just logged in. |
69 std::string session_index_; | 72 std::string session_index_; |
70 std::string email_; | 73 std::string email_; |
71 std::string password_; | 74 std::string password_; |
72 | 75 |
73 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper); | 76 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelper); |
74 }; | 77 }; |
75 | 78 |
76 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ | 79 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_HELPER_H_ |
OLD | NEW |