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

Side by Side Diff: content/browser/frame_host/navigation_controller_android.cc

Issue 2030473002: ABANDONED CL: Using ResourceRequestBody as the type of browser_initiated_post_data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@make-resource-request-body-public
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
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 #include "content/browser/frame_host/navigation_controller_android.h" 5 #include "content/browser/frame_host/navigation_controller_android.h"
6 6
7 #include <stdint.h> 7 #include <stdint.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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 static_cast<NavigationController::UserAgentOverrideOption>( 220 static_cast<NavigationController::UserAgentOverrideOption>(
221 ua_override_option); 221 ua_override_option);
222 params.can_load_local_resources = can_load_local_resources; 222 params.can_load_local_resources = can_load_local_resources;
223 params.is_renderer_initiated = is_renderer_initiated; 223 params.is_renderer_initiated = is_renderer_initiated;
224 params.should_replace_current_entry = should_replace_current_entry; 224 params.should_replace_current_entry = should_replace_current_entry;
225 225
226 if (extra_headers) 226 if (extra_headers)
227 params.extra_headers = ConvertJavaStringToUTF8(env, extra_headers); 227 params.extra_headers = ConvertJavaStringToUTF8(env, extra_headers);
228 228
229 if (post_data) { 229 if (post_data) {
230 LOG(ERROR) << "LUKASZA!";
231 CHECK(false);
230 std::vector<uint8_t> http_body_vector; 232 std::vector<uint8_t> http_body_vector;
231 base::android::JavaByteArrayToByteVector(env, post_data, &http_body_vector); 233 base::android::JavaByteArrayToByteVector(env, post_data, &http_body_vector);
232 params.browser_initiated_post_data = 234 params.post_data = ResourceRequestBody::CreateFromBytes(
233 base::RefCountedBytes::TakeVector(&http_body_vector); 235 reinterpret_cast<const char*>(http_body_vector.data()),
236 http_body_vector.size());
234 } 237 }
235 238
236 if (base_url_for_data_url) { 239 if (base_url_for_data_url) {
237 params.base_url_for_data_url = 240 params.base_url_for_data_url =
238 GURL(ConvertJavaStringToUTF8(env, base_url_for_data_url)); 241 GURL(ConvertJavaStringToUTF8(env, base_url_for_data_url));
239 } 242 }
240 243
241 if (virtual_url_for_data_url) { 244 if (virtual_url_for_data_url) {
242 params.virtual_url_for_data_url = 245 params.virtual_url_for_data_url =
243 GURL(ConvertJavaStringToUTF8(env, virtual_url_for_data_url)); 246 GURL(ConvertJavaStringToUTF8(env, virtual_url_for_data_url));
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 const JavaParamRef<jobject>& obj, 432 const JavaParamRef<jobject>& obj,
430 jlong source_navigation_controller_android, 433 jlong source_navigation_controller_android,
431 jboolean replace_entry) { 434 jboolean replace_entry) {
432 navigation_controller_->CopyStateFromAndPrune( 435 navigation_controller_->CopyStateFromAndPrune(
433 reinterpret_cast<NavigationControllerAndroid*>( 436 reinterpret_cast<NavigationControllerAndroid*>(
434 source_navigation_controller_android)->navigation_controller_, 437 source_navigation_controller_android)->navigation_controller_,
435 replace_entry); 438 replace_entry);
436 } 439 }
437 440
438 } // namespace content 441 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698