Index: chrome/browser/signin/signin_promo.h |
diff --git a/chrome/browser/signin/signin_promo.h b/chrome/browser/signin/signin_promo.h |
index ad84b1642152a2b83a06c1e58e3fea2ce7fd9206..cbb87ad6513b80173965677c88ce8ab62cf57ad1 100644 |
--- a/chrome/browser/signin/signin_promo.h |
+++ b/chrome/browser/signin/signin_promo.h |
@@ -20,8 +20,10 @@ class PrefRegistrySyncable; |
// Utility functions for sign in promos. |
namespace signin { |
+const char kSignInPromoQueryKeyAccessPoint[] = "access_point"; |
const char kSignInPromoQueryKeyAutoClose[] = "auto_close"; |
const char kSignInPromoQueryKeyContinue[] = "continue"; |
+const char kSignInPromoQueryKeyReason[] = "reason"; |
const char kSignInPromoQueryKeySource[] = "source"; |
const char kSignInPromoQueryKeyConstrained[] = "constrained"; |
const char kSignInPromoQueryKeyShowAccountManagement[] = |
@@ -42,24 +44,32 @@ void DidShowPromoAtStartup(Profile* profile); |
void SetUserSkippedPromo(Profile* profile); |
// Gets the sign in landing page URL. |
-GURL GetLandingURL(const char* option, int value); |
+GURL GetLandingURL(signin_metrics::AccessPoint access_point); |
// Returns the sign in promo URL wth the given arguments in the query. |
-// |source| identifies from where the sign in promo is being called, and is |
-// used to record sync promo UMA stats in the context of the source. |
+// |access_point| indicates where the sign in is being initiated. |
+// |reason| indicates the purpose of using this URL. |
// |auto_close| whether to close the sign in promo automatically when done. |
// |is_constrained} whether to load the URL in a constrained window, false |
// by default. |
-GURL GetPromoURL(signin_metrics::Source source, bool auto_close); |
-GURL GetPromoURL(signin_metrics::Source source, |
+GURL GetPromoURL(signin_metrics::AccessPoint access_point, |
+ signin_metrics::Reason reason, |
+ bool auto_close); |
+GURL GetPromoURL(signin_metrics::AccessPoint access_point, |
+ signin_metrics::Reason reason, |
bool auto_close, |
bool is_constrained); |
// Returns a sign in promo URL specifically for reauthenticating |account_id|. |
-GURL GetReauthURL(Profile* profile, const std::string& account_id); |
+GURL GetReauthURL(signin_metrics::AccessPoint access_point, |
+ signin_metrics::Reason reason, |
+ Profile* profile, |
+ const std::string& account_id); |
// Returns a sign in promo URL specifically for reauthenticating |email|. |
-GURL GetReauthURLWithEmail(const std::string& email); |
+GURL GetReauthURLWithEmail(signin_metrics::AccessPoint access_point, |
+ signin_metrics::Reason reason, |
+ const std::string& email); |
// Gets the next page URL from the query portion of the sign in promo URL. |
GURL GetNextPageURLForPromoURL(const GURL& url); |
@@ -67,9 +77,11 @@ GURL GetNextPageURLForPromoURL(const GURL& url); |
// Gets the partition URL for the embedded sign in frame/webview. |
GURL GetSigninPartitionURL(); |
-// Gets the source from the query portion of the sign in promo URL. |
-// The source identifies from where the sign in promo was opened. |
-signin_metrics::Source GetSourceForPromoURL(const GURL& url); |
+// Gets the access point from the query portion of the sign in promo URL. |
+signin_metrics::AccessPoint GetAccessPointForPromoURL(const GURL& url); |
+ |
+// Gets the sign in reason from the query portion of the sign in promo URL. |
+signin_metrics::Reason GetSigninReasonForPromoURL(const GURL& url); |
// Returns true if the auto_close parameter in the given URL is set to true. |
bool IsAutoCloseEnabledInURL(const GURL& url); |