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

Side by Side Diff: ios/chrome/common/x_callback_url.h

Issue 2485573003: Functions to create and manipulate x-callback-url URLs. (Closed)
Patch Set: Address comments Created 4 years, 1 month 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
« no previous file with comments | « ios/chrome/common/DEPS ('k') | ios/chrome/common/x_callback_url.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_COMMON_X_CALLBACK_URL_H_
6 #define IOS_CHROME_COMMON_X_CALLBACK_URL_H_
7
8 #include <map>
9 #include <string>
10
11 #include "base/strings/string_piece.h"
12 #include "url/gurl.h"
13
14 // Returns true if |url| is compliant with the x-callback-url specs.
15 bool IsXCallbackURL(const GURL& url);
16
17 // Returns a GURL compliant with the x-callback-url specs (simple version with
18 // no parameters set, see XCallbackURLWithParameters for constructing complex
19 // URLs).
20 GURL CreateXCallbackURL(base::StringPiece scheme, base::StringPiece action);
21
22 // Returns a GURL compliant with the x-callback-url specs.
23 // See http://x-callback-url.com/specifications/ for specifications.
24 // |scheme| must not be empty, all other parameters may be.
25 GURL CreateXCallbackURLWithParameters(
26 base::StringPiece scheme,
27 base::StringPiece action,
28 const GURL& success_url,
29 const GURL& error_url,
30 const GURL& cancel_url,
31 const std::map<std::string, std::string>& parameters);
32
33 // Extract query parameters from an x-callback-url URL. |x_callback_url| must
34 // be compliant with the x-callback-url specs.
35 std::map<std::string, std::string> ExtractQueryParametersFromXCallbackURL(
36 const GURL& x_callback_url);
37
38 #endif // IOS_CHROME_COMMON_X_CALLBACK_URL_H_
OLDNEW
« no previous file with comments | « ios/chrome/common/DEPS ('k') | ios/chrome/common/x_callback_url.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698