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 COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_WALLET_SERVICE_URL_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_WALLET_SERVICE_URL_H_ |
6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_WALLET_SERVICE_URL_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_WALLET_SERVICE_URL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 class GURL; | 10 class GURL; |
11 | 11 |
12 namespace autofill { | 12 namespace autofill { |
13 namespace wallet { | 13 namespace wallet { |
14 | 14 |
15 // |user_index| is the index into the list of signed-in GAIA profiles for which | 15 // |user_index| is the index into the list of signed-in GAIA profiles for which |
16 // this request is being made. | 16 // this request is being made. |
17 GURL GetGetWalletItemsUrl(size_t user_index); | 17 GURL GetGetWalletItemsUrl(size_t user_index); |
18 GURL GetGetFullWalletUrl(size_t user_index); | 18 GURL GetGetFullWalletUrl(size_t user_index); |
19 GURL GetManageInstrumentsUrl(size_t user_index); | 19 GURL GetManageInstrumentsUrl(size_t user_index); |
20 GURL GetManageAddressesUrl(size_t user_index); | 20 GURL GetManageAddressesUrl(size_t user_index); |
21 GURL GetAcceptLegalDocumentsUrl(size_t user_index); | 21 GURL GetAcceptLegalDocumentsUrl(size_t user_index); |
22 GURL GetAuthenticateInstrumentUrl(size_t user_index); | 22 GURL GetAuthenticateInstrumentUrl(size_t user_index); |
23 GURL GetSaveToWalletNoEscrowUrl(size_t user_index); | 23 GURL GetSaveToWalletNoEscrowUrl(size_t user_index); |
24 GURL GetSaveToWalletUrl(size_t user_index); | 24 GURL GetSaveToWalletUrl(size_t user_index); |
25 GURL GetPassiveAuthUrl(size_t user_index); | 25 GURL GetPassiveAuthUrl(size_t user_index); |
26 | 26 |
27 // URL to visit for presenting the user with a sign-in dialog. | 27 // URL to visit for presenting the user when first signing in. |
28 GURL GetSignInUrl(); | 28 GURL GetAddAccountUrl(); |
| 29 |
| 30 // (Re-)sign into a specific account. |
| 31 GURL GetSignInUrl(size_t user_index); |
29 | 32 |
30 // The the URL to use as a continue parameter in the sign-in URL. | 33 // The the URL to use as a continue parameter in the sign-in URL. |
31 // A redirect to this URL will occur once sign-in is complete. | 34 // A redirect to this URL will occur once sign-in is complete. |
32 GURL GetSignInContinueUrl(); | 35 GURL GetSignInContinueUrl(); |
33 | 36 |
34 // Returns true if |url| is an acceptable variant of the sign-in continue | 37 // Returns true if |url| is an acceptable variant of the sign-in continue |
35 // url. Can be used for detection of navigation to the continue url. If | 38 // url. Can be used for detection of navigation to the continue url. If |
36 // |url| is a sign-in url, |user_index| will also be filled in to indicate | 39 // |url| is a sign-in url, |user_index| will also be filled in to indicate |
37 // which user account just signed in. | 40 // which user account just signed in. |
38 bool IsSignInContinueUrl(const GURL& url, size_t* user_index); | 41 bool IsSignInContinueUrl(const GURL& url, size_t* user_index); |
39 | 42 |
40 // Returns whether |url| is related to sign-in. This is used to determine | 43 // Returns whether |url| is related to sign-in. This is used to determine |
41 // whether to open a new link from the Autofill dialog's sign-in webview. | 44 // whether to open a new link from the Autofill dialog's sign-in webview. |
42 bool IsSignInRelatedUrl(const GURL& url); | 45 bool IsSignInRelatedUrl(const GURL& url); |
43 | 46 |
44 // Whether calls to Online Wallet are hitting the production server rather than | 47 // Whether calls to Online Wallet are hitting the production server rather than |
45 // a sandbox or some malicious endpoint. | 48 // a sandbox or some malicious endpoint. |
46 bool IsUsingProd(); | 49 bool IsUsingProd(); |
47 | 50 |
48 } // namespace wallet | 51 } // namespace wallet |
49 } // namespace autofill | 52 } // namespace autofill |
50 | 53 |
51 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_WALLET_SERVICE_URL_H_ | 54 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_WALLET_SERVICE_URL_H_ |
OLD | NEW |