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_SIGNIN_SIGNIN_PROMO_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_SIGNIN_PROMO_H_ |
6 #define CHROME_BROWSER_SIGNIN_SIGNIN_PROMO_H_ | 6 #define CHROME_BROWSER_SIGNIN_SIGNIN_PROMO_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // |is_constrained} whether to load the URL in a constrained window, false | 51 // |is_constrained} whether to load the URL in a constrained window, false |
52 // by default. | 52 // by default. |
53 GURL GetPromoURL(signin_metrics::Source source, bool auto_close); | 53 GURL GetPromoURL(signin_metrics::Source source, bool auto_close); |
54 GURL GetPromoURL(signin_metrics::Source source, | 54 GURL GetPromoURL(signin_metrics::Source source, |
55 bool auto_close, | 55 bool auto_close, |
56 bool is_constrained); | 56 bool is_constrained); |
57 | 57 |
58 // Returns a sign in promo URL specifically for reauthenticating |account_id|. | 58 // Returns a sign in promo URL specifically for reauthenticating |account_id|. |
59 GURL GetReauthURL(Profile* profile, const std::string& account_id); | 59 GURL GetReauthURL(Profile* profile, const std::string& account_id); |
60 | 60 |
| 61 // Returns a sign in promo URL specifically for reauthenticating |email|. |
| 62 GURL GetReauthURLWithEmail(const std::string& email); |
| 63 |
61 // Gets the next page URL from the query portion of the sign in promo URL. | 64 // Gets the next page URL from the query portion of the sign in promo URL. |
62 GURL GetNextPageURLForPromoURL(const GURL& url); | 65 GURL GetNextPageURLForPromoURL(const GURL& url); |
63 | 66 |
64 // Gets the partition URL for the embedded sign in frame/webview. | 67 // Gets the partition URL for the embedded sign in frame/webview. |
65 GURL GetSigninPartitionURL(); | 68 GURL GetSigninPartitionURL(); |
66 | 69 |
67 // Gets the source from the query portion of the sign in promo URL. | 70 // Gets the source from the query portion of the sign in promo URL. |
68 // The source identifies from where the sign in promo was opened. | 71 // The source identifies from where the sign in promo was opened. |
69 signin_metrics::Source GetSourceForPromoURL(const GURL& url); | 72 signin_metrics::Source GetSourceForPromoURL(const GURL& url); |
70 | 73 |
71 // Returns true if the auto_close parameter in the given URL is set to true. | 74 // Returns true if the auto_close parameter in the given URL is set to true. |
72 bool IsAutoCloseEnabledInURL(const GURL& url); | 75 bool IsAutoCloseEnabledInURL(const GURL& url); |
73 | 76 |
74 // Returns true if the showAccountManagement parameter in the given url is set | 77 // Returns true if the showAccountManagement parameter in the given url is set |
75 // to true. | 78 // to true. |
76 bool ShouldShowAccountManagement(const GURL& url); | 79 bool ShouldShowAccountManagement(const GURL& url); |
77 | 80 |
78 // Forces UseWebBasedSigninFlow() to return true when set; used in tests only. | 81 // Forces UseWebBasedSigninFlow() to return true when set; used in tests only. |
79 void ForceWebBasedSigninFlowForTesting(bool force); | 82 void ForceWebBasedSigninFlowForTesting(bool force); |
80 | 83 |
81 // Registers the preferences the Sign In Promo needs. | 84 // Registers the preferences the Sign In Promo needs. |
82 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 85 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
83 | 86 |
84 } // namespace signin | 87 } // namespace signin |
85 | 88 |
86 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_PROMO_H_ | 89 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_PROMO_H_ |
OLD | NEW |