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

Issue 10829044: Implement NavigationControllerWebView.PostURL (Closed)

Created:
8 years, 4 months ago by boliu
Modified:
8 years, 4 months ago
Reviewers:
jamesr, joth, Charlie Reis
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Implement NavigationControllerWebView.PostURL Used for android WebView.postUrl HasPostData in NavigationEntry is used to indicate to the renderer that the navigation is a http post request. The usage here is slightly overloaded. HasPostData is set when from the renderer side for a http post request. This change also uses it to indicate a browser initiated http post request from PostURL. is_post is added to ViewMsg_Navigate_Params. A BrowserInitiatedPostData field is added to NavigationEntry in order to pass the post data to the renderer. Similar field added to ViewMsg_Navigate_Params. This field is only used for temporarily storing and passing post data to the renderer. Since the post data is also saved in ContentState after loading the it is cleared when ContentState is set. BUG= TEST=New tests passed Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=149232

Patch Set 1 #

Total comments: 9

Patch Set 2 : Use vector<char> to store http_body. Comments not addressed yet #

Patch Set 3 : Add unit tests #

Patch Set 4 : Fixes according to comments. Improve render_view test. #

Total comments: 5

Patch Set 5 : Fix nits. Use RefCountedBytes. #

Total comments: 13

Patch Set 6 : Change RefCountedBytes RefCountedMemory. Fix pointers in method signature. #

Patch Set 7 : Update render view browser test. #

Patch Set 8 : NavigationEntry: clarify comments, return raw pointer #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+198 lines, -3 lines) Patch
M content/browser/web_contents/navigation_controller_impl.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/web_contents/navigation_controller_impl.cc View 1 2 3 4 5 2 chunks +32 lines, -0 lines 0 comments Download
M content/browser/web_contents/navigation_controller_impl_unittest.cc View 1 2 3 4 5 1 chunk +25 lines, -0 lines 0 comments Download
M content/browser/web_contents/navigation_entry_impl.h View 1 2 3 4 5 6 7 2 chunks +11 lines, -1 line 0 comments Download
M content/browser/web_contents/navigation_entry_impl.cc View 1 2 3 4 5 6 7 1 chunk +11 lines, -0 lines 0 comments Download
M content/browser/web_contents/navigation_entry_impl_unittest.cc View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 1 chunk +8 lines, -0 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M content/public/browser/android/navigation_controller_webview.h View 1 2 3 4 5 2 chunks +8 lines, -0 lines 0 comments Download
M content/public/browser/navigation_entry.h View 1 2 3 4 5 6 7 3 chunks +16 lines, -2 lines 1 comment Download
M content/renderer/render_view_browsertest.cc View 1 2 3 4 5 6 2 chunks +46 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 3 chunks +16 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
joth
https://chromiumcodereview.appspot.com/10829044/diff/1/content/browser/web_contents/navigation_controller_impl.cc File content/browser/web_contents/navigation_controller_impl.cc (right): https://chromiumcodereview.appspot.com/10829044/diff/1/content/browser/web_contents/navigation_controller_impl.cc#newcode762 content/browser/web_contents/navigation_controller_impl.cc:762: active_entry->SetBrowserInitiatedPostData(""); I think we prefer std::string() to "" https://chromiumcodereview.appspot.com/10829044/diff/1/content/public/browser/navigation_entry.h ...
8 years, 4 months ago (2012-07-26 20:41:40 UTC) #1
boliu
Hi jam, jamesr, Can I get an initial review of this CL to see if ...
8 years, 4 months ago (2012-07-26 21:06:45 UTC) #2
boliu
Ping! Patch set 4 is ready for review and submission. https://chromiumcodereview.appspot.com/10829044/diff/1/content/browser/web_contents/navigation_controller_impl.cc File content/browser/web_contents/navigation_controller_impl.cc (right): https://chromiumcodereview.appspot.com/10829044/diff/1/content/browser/web_contents/navigation_controller_impl.cc#newcode762 ...
8 years, 4 months ago (2012-07-27 22:47:40 UTC) #3
joth
lg, but IANAO https://chromiumcodereview.appspot.com/10829044/diff/1/content/public/browser/navigation_entry.h File content/public/browser/navigation_entry.h (right): https://chromiumcodereview.appspot.com/10829044/diff/1/content/public/browser/navigation_entry.h#newcode155 content/public/browser/navigation_entry.h:155: virtual void SetBrowserInitiatedPostData(const std::string& data) = ...
8 years, 4 months ago (2012-07-27 23:12:37 UTC) #4
boliu
http://codereview.chromium.org/10829044/diff/9001/content/public/browser/navigation_entry.h File content/public/browser/navigation_entry.h (right): http://codereview.chromium.org/10829044/diff/9001/content/public/browser/navigation_entry.h#newcode145 content/public/browser/navigation_entry.h:145: virtual const std::vector<char>& GetBrowserInitiatedPostData() const = 0; Does RefCountedMemory ...
8 years, 4 months ago (2012-07-27 23:17:36 UTC) #5
jam
Charlie: can you take a look at this too? Thanks http://codereview.chromium.org/10829044/diff/9001/content/public/browser/navigation_entry.h File content/public/browser/navigation_entry.h (right): http://codereview.chromium.org/10829044/diff/9001/content/public/browser/navigation_entry.h#newcode145 ...
8 years, 4 months ago (2012-07-27 23:36:14 UTC) #6
joth
On 2012/07/27 23:36:14, John Abd-El-Malek wrote: > Charlie: can you take a look at this ...
8 years, 4 months ago (2012-07-28 00:34:49 UTC) #7
Charlie Reis
On 2012/07/27 23:36:14, John Abd-El-Malek wrote: > Charlie: can you take a look at this ...
8 years, 4 months ago (2012-07-28 00:36:59 UTC) #8
boliu
As far as I know, session restore post data is stored in the opaque NavigationEntry::Get/SetContentState. ...
8 years, 4 months ago (2012-07-28 01:06:17 UTC) #9
boliu
Switched to using RefCountedBytes and saves step 2). Did not use RefCountedMemory super class in ...
8 years, 4 months ago (2012-07-30 18:52:08 UTC) #10
boliu
And the inline comment. http://codereview.chromium.org/10829044/diff/8012/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): http://codereview.chromium.org/10829044/diff/8012/content/browser/web_contents/web_contents_impl.cc#newcode241 content/browser/web_contents/web_contents_impl.cc:241: params->browser_initiated_post_data = A copy can ...
8 years, 4 months ago (2012-07-30 18:52:40 UTC) #11
joth
I'm not overly excited by switching from vector->RefCountedMem just for saving one copy, but it ...
8 years, 4 months ago (2012-07-30 19:10:18 UTC) #12
Charlie Reis
On 2012/07/28 01:06:17, boliu wrote: > As far as I know, session restore post data ...
8 years, 4 months ago (2012-07-30 20:36:38 UTC) #13
boliu
http://codereview.chromium.org/10829044/diff/8012/content/browser/web_contents/navigation_controller_impl.cc File content/browser/web_contents/navigation_controller_impl.cc (right): http://codereview.chromium.org/10829044/diff/8012/content/browser/web_contents/navigation_controller_impl.cc#newcode661 content/browser/web_contents/navigation_controller_impl.cc:661: // Must be http scheme for a post request ...
8 years, 4 months ago (2012-07-30 21:53:45 UTC) #14
boliu
Hi John, could you take another look at this cl? I think it is about ...
8 years, 4 months ago (2012-07-31 00:05:11 UTC) #15
jam
creis is an owner now, so deferring to him
8 years, 4 months ago (2012-07-31 01:45:39 UTC) #16
boliu
Hi Charlie, do you want to take another look or can I try landing with ...
8 years, 4 months ago (2012-07-31 15:33:29 UTC) #17
Charlie Reis
Still LGTM.
8 years, 4 months ago (2012-07-31 16:39:42 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/boliu@chromium.org/10829044/11021
8 years, 4 months ago (2012-07-31 17:00:24 UTC) #19
commit-bot: I haz the power
8 years, 4 months ago (2012-07-31 18:32:49 UTC) #20
Change committed as 149232

Powered by Google App Engine
This is Rietveld 408576698