| Index: content/public/android/java/src/org/chromium/content_public/browser/LoadUrlParams.java
|
| diff --git a/content/public/android/java/src/org/chromium/content_public/browser/LoadUrlParams.java b/content/public/android/java/src/org/chromium/content_public/browser/LoadUrlParams.java
|
| index 89167b88ff3231d5fa0d4b00e6e207ea6fc2e85f..19235cb9959b468dd12de0f0660815ca306c110b 100644
|
| --- a/content/public/android/java/src/org/chromium/content_public/browser/LoadUrlParams.java
|
| +++ b/content/public/android/java/src/org/chromium/content_public/browser/LoadUrlParams.java
|
| @@ -27,6 +27,7 @@ public class LoadUrlParams {
|
| // native code. Should not be accessed directly anywhere else outside of
|
| // this class.
|
| String mUrl;
|
| + String mMethod;
|
| int mLoadUrlType;
|
| int mTransitionType;
|
| Referrer mReferrer;
|
| @@ -62,6 +63,7 @@ public class LoadUrlParams {
|
|
|
| // Initialize other fields to defaults matching defaults of the native
|
| // NavigationController::LoadUrlParams.
|
| + mMethod = "GET";
|
| mLoadUrlType = LoadURLType.DEFAULT;
|
| mUaOverrideOption = UserAgentOverrideOption.INHERIT;
|
| mPostData = null;
|
| @@ -177,7 +179,7 @@ public class LoadUrlParams {
|
| public static LoadUrlParams createLoadHttpPostParams(
|
| String url, byte[] postData) {
|
| LoadUrlParams params = new LoadUrlParams(url);
|
| - params.setLoadType(LoadURLType.BROWSER_INITIATED_HTTP_POST);
|
| + params.setMethod("POST");
|
| params.setTransitionType(PageTransition.TYPED);
|
| params.setPostData(postData);
|
| return params;
|
| @@ -205,6 +207,14 @@ public class LoadUrlParams {
|
| }
|
|
|
| /**
|
| + * Set HTTP method of this load. Defaults to "GET".
|
| + * @param method HTTP method to use for this load.
|
| + */
|
| + public void setMethod(String method) {
|
| + mMethod = method;
|
| + }
|
| +
|
| + /**
|
| * Set load type of this load. Defaults to LoadURLType.DEFAULT.
|
| * @param loadType One of LOAD_TYPE static constants above.
|
| */
|
| @@ -326,8 +336,7 @@ public class LoadUrlParams {
|
| }
|
|
|
| /**
|
| - * Set the post data of this load. This field is ignored unless load type is
|
| - * LoadURLType.BROWSER_INITIATED_HTTP_POST.
|
| + * Set the post data of this load. This field is ignored unless the HTTP method is "POST".
|
| * @param postData Post data for this http post load.
|
| */
|
| @SuppressFBWarnings("EI_EXPOSE_REP2")
|
|
|