Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: chrome/browser/signin/signin_promo.h

Issue 196783002: Export a private webstore API to call into the new inline sign-in flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Redirect to the continue URL when Sync is disabled Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 // Returns the sign in promo URL wth the given arguments in the query. 55 // Returns the sign in promo URL wth the given arguments in the query.
56 // |source| identifies from where the sign in promo is being called, and is 56 // |source| identifies from where the sign in promo is being called, and is
57 // used to record sync promo UMA stats in the context of the source. 57 // used to record sync promo UMA stats in the context of the source.
58 // |auto_close| whether to close the sign in promo automatically when done. 58 // |auto_close| whether to close the sign in promo automatically when done.
59 // |is_constrained} whether to load the URL in a constrained window, false 59 // |is_constrained} whether to load the URL in a constrained window, false
60 // by default. 60 // by default.
61 GURL GetPromoURL(Source source, bool auto_close); 61 GURL GetPromoURL(Source source, bool auto_close);
62 GURL GetPromoURL(Source source, bool auto_close, bool is_constrained); 62 GURL GetPromoURL(Source source, bool auto_close, bool is_constrained);
63 63
64 // As above, but also appends the |continue_url| as a parameter to the URL.
65 // A |continue_url| may be set only when not using the web-based sign-in flow.
66 GURL GetPromoURLWithContinueURL(Source source,
67 bool auto_close,
68 bool is_constrained,
69 GURL continue_url);
70
64 // Returns a sign in promo URL specifically for reauthenticating |account_id|. 71 // Returns a sign in promo URL specifically for reauthenticating |account_id|.
65 GURL GetReauthURL(Profile* profile, const std::string& account_id); 72 GURL GetReauthURL(Profile* profile, const std::string& account_id);
66 73
67 // Gets the next page URL from the query portion of the sign in promo URL. 74 // Gets the next page URL from the query portion of the sign in promo URL.
68 GURL GetNextPageURLForPromoURL(const GURL& url); 75 GURL GetNextPageURLForPromoURL(const GURL& url);
69 76
70 // Gets the source from the query portion of the sign in promo URL. 77 // 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. 78 // The source identifies from where the sign in promo was opened.
72 Source GetSourceForPromoURL(const GURL& url); 79 Source GetSourceForPromoURL(const GURL& url);
73 80
74 // Returns true if the auto_close parameter in the given URL is set to true. 81 // Returns true if the auto_close parameter in the given URL is set to true.
75 bool IsAutoCloseEnabledInURL(const GURL& url); 82 bool IsAutoCloseEnabledInURL(const GURL& url);
76 83
77 // Returns true if the given URL is the standard continue URL used with the 84 // Returns true if the given URL is the standard continue URL used with the
78 // sync promo when the web-based flow is enabled. The query parameters 85 // sync promo when the web-based flow is enabled. The query parameters
79 // of the URL are ignored for this comparison. 86 // of the URL are ignored for this comparison.
80 bool IsContinueUrlForWebBasedSigninFlow(const GURL& url); 87 bool IsContinueUrlForWebBasedSigninFlow(const GURL& url);
81 88
82 // Forces UseWebBasedSigninFlow() to return true when set; used in tests only. 89 // Forces UseWebBasedSigninFlow() to return true when set; used in tests only.
83 void ForceWebBasedSigninFlowForTesting(bool force); 90 void ForceWebBasedSigninFlowForTesting(bool force);
84 91
85 // Registers the preferences the Sign In Promo needs. 92 // Registers the preferences the Sign In Promo needs.
86 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 93 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
87 94
88 } // namespace signin 95 } // namespace signin
89 96
90 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_PROMO_H_ 97 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_PROMO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698