|
Using ResourceRequestBody as the type of HTTP body outside of //content.
This CL changes representation of HTTP body used above //content layer.
Before this CL, HTTP body was represented by base::RefCountedMemory;
after this CL it is represented by a more generic ResourceRequestBody.
This lays the foundations for passing an arbitrary HTTP body out of and
back into //content via content::OpenURLParams and
NavigationController::LoadURLParams. This ability will be used in a
later CL to preserve body of HTTP POST for navigations handled via
FrameHostMsg_OpenURL IPC message.
This CL adjusts names of fields and enum and values to reflect that
ResourceRequestBody can now represent not only browser-initiated POST
data, but also renderer-initiated POST data. Such change should be safe
(since we already track who initiated the navigation in
|is_renderer_initiated| field and should make security decisions based
on this field).
Summary of the changes:
- Renamed fields and enum values:
- |browser_initiated_post_data| -> |post_data|.
- |LOAD_TYPE_BROWSER_INITIATED_HTTP_POST| -> |LOAD_TYPE_HTTP_POST|.
- Changed type of |browser_initiated_post_data| aka |post_data|:
- |scoped_refptr<base::RefCountedMemory>| ->
|scoped_refptr<content::ResourceRequestBody>|
- Java byte[] -> ResourceRequestBody Java class that wraps a
serialized form of the native content::ResourceRequestBody.
- Exposed ability to create ResourceRequestBody out of a byte array
- in C++ (used by test code and DoSearchByImageInNewTab) and
Java (needed by a public WebView::postUrl API in Android SDK).
- Follow-up changes
- Removed no longer needed code:
NavigationEntryImpl::ConstructBodyFromBrowserInitiatedPostData
- Tweaked tests to account for new behavior (most imporatantly - reverse
expectations in SendRendererInitiatedRequestUsingPOST test in
chrome/browser/ui/browser_navigator_browsertest.cc)
- Forwarding post body into LoadURLParams without looking at
|is_renderer_initiated| (in chrome/browser/ui/browser_navigator.cc,
components/web_contents_delegate_android/web_contents_delegate_android.cc
and content/shell/browser/shell.cc).
BUG= 344348
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation
Committed: https://crrev.com/477a5a270598c17e72365572114490ae60e1ef56
Cr-Commit-Position: refs/heads/master@{#400211}
Total comments: 26
Total comments: 4
Total comments: 3
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+487 lines, -236 lines) |
Patch |
 |
M |
android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java
|
View
|
1
2
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/ChromeServiceTabLauncher.java
|
View
|
1
2
3
4
5
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsDelegateAndroid.java
|
View
|
1
2
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/android/tab_android.h
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/android/tab_android.cc
|
View
|
1
2
3
4
5
|
6 chunks |
+8 lines, -17 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/prerender/prerender_browsertest.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/browser_navigator.cc
|
View
|
|
1 chunk |
+4 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/browser_navigator_browsertest.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
4 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/browser_navigator_params.h
|
View
|
|
2 chunks |
+2 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/browser_navigator_params.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/tab_contents/core_tab_helper.cc
|
View
|
1
2
3
4
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/test/base/ui_test_utils.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
components/service_tab_launcher/android/java/src/org/chromium/components/service_tab_launcher/ServiceTabLauncher.java
|
View
|
1
2
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
components/service_tab_launcher/browser/android/service_tab_launcher.cc
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java
|
View
|
1
2
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
components/web_contents_delegate_android/web_contents_delegate_android.cc
|
View
|
1
2
|
2 chunks |
+6 lines, -14 lines |
0 comments
|
Download
|
 |
M |
content/browser/frame_host/navigation_controller_android.h
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/frame_host/navigation_controller_android.cc
|
View
|
1
2
|
3 chunks |
+3 lines, -8 lines |
0 comments
|
Download
|
 |
M |
content/browser/frame_host/navigation_controller_impl.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/browser/frame_host/navigation_controller_impl_unittest.cc
|
View
|
1
2
3
4
5
|
5 chunks |
+11 lines, -19 lines |
0 comments
|
Download
|
 |
M |
content/browser/frame_host/navigation_entry_impl.h
|
View
|
1
2
3
4
|
4 chunks |
+6 lines, -8 lines |
0 comments
|
Download
|
 |
M |
content/browser/frame_host/navigation_entry_impl.cc
|
View
|
1
|
5 chunks |
+8 lines, -23 lines |
0 comments
|
Download
|
 |
M |
content/browser/frame_host/navigation_entry_impl_unittest.cc
|
View
|
|
1 chunk |
+8 lines, -11 lines |
0 comments
|
Download
|
 |
M |
content/browser/net/network_errors_listing_ui.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
content/browser/webui/web_ui_mojo_browsertest.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
content/common/android/common_jni_registrar.cc
|
View
|
1
2
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/common/android/resource_request_body_android.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+35 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/common/android/resource_request_body_android.cc
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+89 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/common/page_state_serialization.h
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+12 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/common/page_state_serialization.cc
|
View
|
1
2
3
4
5
6
7
8
|
5 chunks |
+79 lines, -45 lines |
0 comments
|
Download
|
 |
M |
content/content_common.gypi
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/content_jni.gypi
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
content/public/android/BUILD.gn
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java
|
View
|
1
2
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/public/android/java/src/org/chromium/content_public/browser/LoadUrlParams.java
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+7 lines, -9 lines |
0 comments
|
Download
|
 |
A |
content/public/android/java/src/org/chromium/content_public/common/ResourceRequestBody.java
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+69 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/public/browser/navigation_controller.h
|
View
|
1
2
3
4
5
|
3 chunks |
+7 lines, -8 lines |
0 comments
|
Download
|
 |
M |
content/public/browser/navigation_controller.cc
|
View
|
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/public/browser/navigation_entry.h
|
View
|
1
2
3
4
5
|
3 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
content/public/browser/page_navigator.h
|
View
|
|
2 chunks |
+2 lines, -5 lines |
0 comments
|
Download
|
 |
M |
content/public/common/resource_request_body.h
|
View
|
1
2
3
4
5
|
1 chunk |
+35 lines, -8 lines |
0 comments
|
Download
|
 |
M |
content/public/common/resource_request_body.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+28 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/shell/browser/shell.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+3 lines, -6 lines |
0 comments
|
Download
|
Depends on Patchset:
Dependent Patchsets:
Total messages: 42 (15 generated)
|