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

Side by Side Diff: chrome/browser/android/tab_android.cc

Issue 2022483003: ABANDONED CL: LoadURLParams: Add |method| + removing LOAD_TYPE_BROWSER_INITIATED_HTTP_POST. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@post-data-my-stuff
Patch Set: Rebasing... Created 4 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/ui/browser_navigator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #include "chrome/browser/android/tab_android.h" 5 #include "chrome/browser/android/tab_android.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 content::RecordAction(base::UserMetricsAction("ShowHistory")); 579 content::RecordAction(base::UserMetricsAction("ShowHistory"));
580 } 580 }
581 581
582 content::NavigationController::LoadURLParams load_params(fixed_url); 582 content::NavigationController::LoadURLParams load_params(fixed_url);
583 if (j_extra_headers) { 583 if (j_extra_headers) {
584 load_params.extra_headers = base::android::ConvertJavaStringToUTF8( 584 load_params.extra_headers = base::android::ConvertJavaStringToUTF8(
585 env, 585 env,
586 j_extra_headers); 586 j_extra_headers);
587 } 587 }
588 if (j_post_data) { 588 if (j_post_data) {
589 load_params.load_type = 589 load_params.method = "POST";
590 content::NavigationController::LOAD_TYPE_BROWSER_INITIATED_HTTP_POST;
591 std::vector<uint8_t> post_data; 590 std::vector<uint8_t> post_data;
592 base::android::JavaByteArrayToByteVector(env, j_post_data, &post_data); 591 base::android::JavaByteArrayToByteVector(env, j_post_data, &post_data);
593 load_params.browser_initiated_post_data = 592 load_params.browser_initiated_post_data =
594 base::RefCountedBytes::TakeVector(&post_data); 593 base::RefCountedBytes::TakeVector(&post_data);
595 } 594 }
596 load_params.transition_type = 595 load_params.transition_type =
597 ui::PageTransitionFromInt(page_transition); 596 ui::PageTransitionFromInt(page_transition);
598 if (j_referrer_url) { 597 if (j_referrer_url) {
599 load_params.referrer = content::Referrer( 598 load_params.referrer = content::Referrer(
600 GURL(base::android::ConvertJavaStringToUTF8(env, j_referrer_url)), 599 GURL(base::android::ConvertJavaStringToUTF8(env, j_referrer_url)),
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 static void Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { 909 static void Init(JNIEnv* env, const JavaParamRef<jobject>& obj) {
911 TRACE_EVENT0("native", "TabAndroid::Init"); 910 TRACE_EVENT0("native", "TabAndroid::Init");
912 // This will automatically bind to the Java object and pass ownership there. 911 // This will automatically bind to the Java object and pass ownership there.
913 new TabAndroid(env, obj); 912 new TabAndroid(env, obj);
914 } 913 }
915 914
916 // static 915 // static
917 bool TabAndroid::RegisterTabAndroid(JNIEnv* env) { 916 bool TabAndroid::RegisterTabAndroid(JNIEnv* env) {
918 return RegisterNativesImpl(env); 917 return RegisterNativesImpl(env);
919 } 918 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/browser_navigator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698