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

Issue 10823207: Consolidate ContentViewCore::Load* functions (Closed)

Created:
8 years, 4 months ago by boliu
Modified:
8 years, 4 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, erikwright (departed), darin-cc_chromium.org, jam, brettw-cc_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@cleanup_load
Visibility:
Public.

Description

Consolidate ContentViewCore::Load* functions Consolidate all ContentViewCore::Load* methods into a single LoadUrl call that takes a NavigationController::LoadURLParam. Consolidate all jni ContentViewCore::Load* methods by adding a Java LoadUrlParams. The data is copied to a native AndroidLoadUrlParams object in native jni code. BUG=142933 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=151784

Patch Set 1 #

Patch Set 2 : Fixes. Removed setting ua override on every load. #

Patch Set 3 : Add comments #

Patch Set 4 : Split up nativeLoadUrl parameters and get rid of most of jni code. Moved android_load_url_params. #

Total comments: 6

Patch Set 5 : Remove function definitions from content_view_core.h #

Patch Set 6 : Fix #include. Fix #ifndef guard. Add java doc. #

Total comments: 8

Patch Set 7 : Add JNINamespace to LoadUrlParams. #

Patch Set 8 : Rebase. Add extra_headers to LoadUrlParams. #

Total comments: 6

Patch Set 9 : address Charlie's comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+269 lines, -119 lines) Patch
M content/browser/android/browser_jni_registrar.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/android/content_view_core_impl.h View 1 2 3 4 5 6 7 2 chunks +12 lines, -15 lines 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 7 8 5 chunks +47 lines, -44 lines 0 comments Download
A + content/browser/android/load_url_params.h View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
A content/browser/android/load_url_params.cc View 1 2 3 1 chunk +37 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_jni.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentView.java View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -17 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 2 3 4 5 6 7 8 2 chunks +22 lines, -38 lines 0 comments Download
A content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java View 1 2 3 4 5 6 7 8 1 chunk +132 lines, -0 lines 2 comments Download
M content/public/browser/navigation_controller.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -0 lines 0 comments Download
M content/shell/android/java/src/org/chromium/content_shell/Shell.java View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 18 (0 generated)
boliu
8 years, 4 months ago (2012-08-09 00:18:08 UTC) #1
boliu
Depends on http://codereview.chromium.org/10830144/ which has not landed yet.
8 years, 4 months ago (2012-08-09 00:20:28 UTC) #2
joth
http://codereview.chromium.org/10823207/diff/5002/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java File content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java (right): http://codereview.chromium.org/10823207/diff/5002/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java#newcode40 content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java:40: public LoadUrlParams(String url) { we could add: // check ...
8 years, 4 months ago (2012-08-09 00:33:55 UTC) #3
boliu
http://codereview.chromium.org/10823207/diff/5002/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java File content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java (right): http://codereview.chromium.org/10823207/diff/5002/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java#newcode40 content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java:40: public LoadUrlParams(String url) { On 2012/08/09 00:33:55, joth wrote: ...
8 years, 4 months ago (2012-08-09 01:22:00 UTC) #4
Yaron
http://codereview.chromium.org/10823207/diff/6028/content/browser/android/load_url_params.cc File content/browser/android/load_url_params.cc (right): http://codereview.chromium.org/10823207/diff/6028/content/browser/android/load_url_params.cc#newcode14 content/browser/android/load_url_params.cc:14: using content::NavigationController; Why not just have this function in ...
8 years, 4 months ago (2012-08-09 21:32:31 UTC) #5
boliu
http://codereview.chromium.org/10823207/diff/6028/content/browser/android/load_url_params.cc File content/browser/android/load_url_params.cc (right): http://codereview.chromium.org/10823207/diff/6028/content/browser/android/load_url_params.cc#newcode14 content/browser/android/load_url_params.cc:14: using content::NavigationController; RegisterConstants is in the anonymous namespace so ...
8 years, 4 months ago (2012-08-10 01:17:19 UTC) #6
Yaron
lgtm http://codereview.chromium.org/10823207/diff/6028/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): http://codereview.chromium.org/10823207/diff/6028/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode367 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:367: if (mNativeContentViewCore == 0) return; On 2012/08/10 01:17:19, ...
8 years, 4 months ago (2012-08-14 01:51:04 UTC) #7
boliu
Hi Charlie, this is a refactor of Android only code that comes with a few ...
8 years, 4 months ago (2012-08-14 23:00:33 UTC) #8
Charlie Reis
LGTM, with nits and one question about how to keep in sync. http://codereview.chromium.org/10823207/diff/13001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc ...
8 years, 4 months ago (2012-08-15 17:48:38 UTC) #9
boliu
http://codereview.chromium.org/10823207/diff/13001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): http://codereview.chromium.org/10823207/diff/13001/content/browser/android/content_view_core_impl.cc#newcode217 content/browser/android/content_view_core_impl.cc:217: if (base_url_for_data_url) On 2012/08/15 17:48:38, creis wrote: > nit: ...
8 years, 4 months ago (2012-08-15 18:36:19 UTC) #10
Charlie Reis
Thanks. Please also have an associated bug number for this CL. LGTM.
8 years, 4 months ago (2012-08-15 18:40:15 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/boliu@chromium.org/10823207/1013
8 years, 4 months ago (2012-08-15 19:33:16 UTC) #12
commit-bot: I haz the power
Try job failure for 10823207-1013 on win_rel for step "update". http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=52757 Step "update" is always ...
8 years, 4 months ago (2012-08-15 20:07:05 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/boliu@chromium.org/10823207/1013
8 years, 4 months ago (2012-08-15 20:54:17 UTC) #14
commit-bot: I haz the power
Change committed as 151784
8 years, 4 months ago (2012-08-15 23:33:17 UTC) #15
joth
(late reply to yaron's comment) http://codereview.chromium.org/10823207/diff/6028/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): http://codereview.chromium.org/10823207/diff/6028/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode367 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:367: if (mNativeContentViewCore == 0) ...
8 years, 4 months ago (2012-08-16 01:26:42 UTC) #16
mkosiba (inactive)
https://chromiumcodereview.appspot.com/10823207/diff/1013/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java File content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java (right): https://chromiumcodereview.appspot.com/10823207/diff/1013/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java#newcode55 content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java:55: any particular reason you omitted the Data url constructor?
8 years, 4 months ago (2012-08-16 13:43:01 UTC) #17
boliu
8 years, 4 months ago (2012-08-16 14:16:10 UTC) #18
https://chromiumcodereview.appspot.com/10823207/diff/1013/content/public/andr...
File
content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java
(right):

https://chromiumcodereview.appspot.com/10823207/diff/1013/content/public/andr...
content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java:55:

On 2012/08/16 13:43:01, Martin Kosiba wrote:
> any particular reason you omitted the Data url constructor?

The downstream version of this class has additional static factories for
creating the data urls. I didn't include in the upstream CL because they are not
being used by any code upstream yet.

If you mean why the base/virtual urls are initialized to null, it's because null
here translates to empty string in the native LoadURLParams which is the
default.

Powered by Google App Engine
This is Rietveld 408576698