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" |
| 11 #include "chrome/browser/ui/profile_chooser_constants.h" |
11 #include "components/signin/core/browser/signin_metrics.h" | 12 #include "components/signin/core/browser/signin_metrics.h" |
12 | 13 |
13 class GURL; | 14 class GURL; |
14 class Profile; | 15 class Profile; |
15 | 16 |
16 namespace user_prefs { | 17 namespace user_prefs { |
17 class PrefRegistrySyncable; | 18 class PrefRegistrySyncable; |
18 } | 19 } |
19 | 20 |
20 // Utility functions for sign in promos. | 21 // Utility functions for sign in promos. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 61 |
61 // Returns a sign in promo URL specifically for reauthenticating |email|. | 62 // Returns a sign in promo URL specifically for reauthenticating |email|. |
62 GURL GetReauthURLWithEmail(const std::string& email); | 63 GURL GetReauthURLWithEmail(const std::string& email); |
63 | 64 |
64 // Gets the next page URL from the query portion of the sign in promo URL. | 65 // Gets the next page URL from the query portion of the sign in promo URL. |
65 GURL GetNextPageURLForPromoURL(const GURL& url); | 66 GURL GetNextPageURLForPromoURL(const GURL& url); |
66 | 67 |
67 // Gets the partition URL for the embedded sign in frame/webview. | 68 // Gets the partition URL for the embedded sign in frame/webview. |
68 GURL GetSigninPartitionURL(); | 69 GURL GetSigninPartitionURL(); |
69 | 70 |
| 71 // Gets the signin URL to be used to display the sign in flow for |mode| in |
| 72 // |profile|. |
| 73 GURL GetSigninURLFromBubbleViewMode(Profile* profile, |
| 74 profiles::BubbleViewMode mode); |
| 75 |
70 // Gets the source from the query portion of the sign in promo URL. | 76 // Gets the source from the query portion of the sign in promo URL. |
71 // The source identifies from where the sign in promo was opened. | 77 // The source identifies from where the sign in promo was opened. |
72 signin_metrics::Source GetSourceForPromoURL(const GURL& url); | 78 signin_metrics::Source GetSourceForPromoURL(const GURL& url); |
73 | 79 |
74 // Returns true if the auto_close parameter in the given URL is set to true. | 80 // Returns true if the auto_close parameter in the given URL is set to true. |
75 bool IsAutoCloseEnabledInURL(const GURL& url); | 81 bool IsAutoCloseEnabledInURL(const GURL& url); |
76 | 82 |
77 // Returns true if the showAccountManagement parameter in the given url is set | 83 // Returns true if the showAccountManagement parameter in the given url is set |
78 // to true. | 84 // to true. |
79 bool ShouldShowAccountManagement(const GURL& url); | 85 bool ShouldShowAccountManagement(const GURL& url); |
80 | 86 |
81 // Forces UseWebBasedSigninFlow() to return true when set; used in tests only. | 87 // Forces UseWebBasedSigninFlow() to return true when set; used in tests only. |
82 void ForceWebBasedSigninFlowForTesting(bool force); | 88 void ForceWebBasedSigninFlowForTesting(bool force); |
83 | 89 |
84 // Registers the preferences the Sign In Promo needs. | 90 // Registers the preferences the Sign In Promo needs. |
85 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 91 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
86 | 92 |
87 } // namespace signin | 93 } // namespace signin |
88 | 94 |
89 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_PROMO_H_ | 95 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_PROMO_H_ |
OLD | NEW |