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

Issue 145213003: Initial upload of cronet for Android. (Closed)

Created:
6 years, 11 months ago by mef
Modified:
6 years, 9 months ago
Reviewers:
cbentzel, tonycuadra, Charles, szym, dpetrou, dplotnikov, fnk_, mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org
Visibility:
Public.

Description

- Copied existing C++ and Java JNI implementation. - Fixed compilation errors, added custom cflags and ldflags. - Added cronet_package target to build libcronet.so and cronet.jar. - Added cronet_sample_apk target to build CronetSample.apk sample app. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257131

Patch Set 1 : Initial upload #

Patch Set 2 : Move and rename some files #

Patch Set 3 : Added cronet_unittests_apk target. #

Patch Set 4 : Added cronet sample apk. Fixed startup issues. #

Patch Set 5 : Get Cronet Sample apk to complete request. #

Patch Set 6 : Better Cronet Sample UI. #

Patch Set 7 : Fixed cronet_jni_headers. #

Patch Set 8 : Applied clm's cflags and ldflags. #

Patch Set 9 : Added cronet_package target to copy cronet.jar and stripped libcronet.so #

Total comments: 2

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : Replaced android_log with chromium VLOG. #

Patch Set 13 : Initialize ICU, upstream netjni bugfix. #

Patch Set 14 : Sync to r251102 #

Patch Set 15 : Fix java and clang compilation errors. #

Patch Set 16 : Fix problems with component=shared_library (on android_clang_dbg bot). #

Patch Set 17 : NET_EXPORT RequestPriorityToString to avoid buildbot errors. #

Total comments: 174

Patch Set 18 : Address some codereview comments. #

Patch Set 19 : Address code review comments. #

Total comments: 16

Patch Set 20 : Reupload to fix xml files. #

Patch Set 21 : Fix codereview comments and findbugs warnings. #

Total comments: 1

Patch Set 22 : Store clone of data in UrlRequest mPostBody. #

Total comments: 2

Patch Set 23 : Don't store post data in UrlRequest, pass it to native. #

Patch Set 24 : Get testPostData to execute. It gets 411 from test server for now. #

Total comments: 10

Patch Set 25 : Address codereview comments. #

Patch Set 26 : Changed copyright year on sample code back to 2012 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2407 lines, -106 lines) Patch
A + build/android/adb_gdb_cronet_sample View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M net/base/request_priority.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +3 lines, -1 line 0 comments Download
A net/cronet/android/java/src/org/chromium/net/UrlRequest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +427 lines, -0 lines 0 comments Download
A net/cronet/android/java/src/org/chromium/net/UrlRequestContext.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +66 lines, -0 lines 0 comments Download
A net/cronet/android/org_chromium_net_UrlRequest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +95 lines, -0 lines 0 comments Download
A net/cronet/android/org_chromium_net_UrlRequest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +364 lines, -0 lines 0 comments Download
A net/cronet/android/org_chromium_net_UrlRequestContext.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +41 lines, -0 lines 0 comments Download
A net/cronet/android/org_chromium_net_UrlRequestContext.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +175 lines, -0 lines 0 comments Download
A + net/cronet/android/sample/AndroidManifest.xml View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
A + net/cronet/android/sample/javatests/AndroidManifest.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +8 lines, -7 lines 0 comments Download
A + net/cronet/android/sample/javatests/src/org/chromium/cronet_sample_apk/Criteria.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +1 line, -1 line 0 comments Download
A + net/cronet/android/sample/javatests/src/org/chromium/cronet_sample_apk/CriteriaHelper.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +1 line, -1 line 0 comments Download
A + net/cronet/android/sample/javatests/src/org/chromium/cronet_sample_apk/CronetSamplePreconditionsTest.java View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
A + net/cronet/android/sample/javatests/src/org/chromium/cronet_sample_apk/CronetSampleTestBase.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 8 chunks +26 lines, -84 lines 0 comments Download
A net/cronet/android/sample/javatests/src/org/chromium/cronet_sample_apk/CronetSampleUrlTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +64 lines, -0 lines 0 comments Download
A + net/cronet/android/sample/res/layout/cronet_sample_activity.xml View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
A + net/cronet/android/sample/res/values/strings.xml View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
A net/cronet/android/sample/src/org/chromium/cronet_sample_apk/CronetSampleActivity.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +172 lines, -0 lines 0 comments Download
A net/cronet/android/sample/src/org/chromium/cronet_sample_apk/CronetSampleApplication.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +30 lines, -0 lines 0 comments Download
A net/cronet/android/sample/src/org/chromium/cronet_sample_apk/LibraryLoader.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +23 lines, -0 lines 0 comments Download
A net/cronet/android/url_request_context_peer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +82 lines, -0 lines 0 comments Download
A net/cronet/android/url_request_context_peer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +230 lines, -0 lines 0 comments Download
A net/cronet/android/url_request_peer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +137 lines, -0 lines 0 comments Download
A net/cronet/android/url_request_peer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +296 lines, -0 lines 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +154 lines, -0 lines 0 comments Download

Messages

Total messages: 70 (0 generated)
mef
Hi, please take a look. It is 'private' issue, only visible by @chromium and @google ...
6 years, 11 months ago (2014-01-23 15:47:07 UTC) #1
szym
How big is the Release build? On Thu, Jan 23, 2014 at 7:47 AM, <mef@chromium.org> ...
6 years, 11 months ago (2014-01-23 15:49:06 UTC) #2
mef1
153mb is release, OTOH libcontent_shell_content_view.so is 1917mb, so there is clearly something fishy. Interestingly libcontent_shell_content_view.so ...
6 years, 11 months ago (2014-01-23 15:55:31 UTC) #3
mmenke
May take me a while to dig through all this, but one quick comment: Maybe ...
6 years, 11 months ago (2014-01-23 15:55:56 UTC) #4
mmenke
Maybe have to make buildtype official to get rid of symbols? On 2014/01/23 15:55:31, mef_google.com ...
6 years, 11 months ago (2014-01-23 15:57:18 UTC) #5
szym
We will definitely need a shippable build target -- that is without symbols. Adding 'buildtype': ...
6 years, 11 months ago (2014-01-23 16:01:59 UTC) #6
mmenke
Doesn't look like the code is using URLRequestContextBuilder. Shouldn't worry about it for now, since ...
6 years, 11 months ago (2014-01-23 16:30:28 UTC) #7
mef
On 2014/01/23 15:55:56, mmenke wrote: > May take me a while to dig through all ...
6 years, 11 months ago (2014-01-23 16:33:52 UTC) #8
mmenke
On 2014/01/23 16:33:52, mef wrote: > On 2014/01/23 15:55:56, mmenke wrote: > > May take ...
6 years, 11 months ago (2014-01-23 16:39:04 UTC) #9
szym
On Thu, Jan 23, 2014 at 8:30 AM, <mmenke@chromium.org> wrote: > Doesn't look like the ...
6 years, 11 months ago (2014-01-23 16:42:33 UTC) #10
mmenke
I noticed that, but a bunch of other similar files use cpp as well, so ...
6 years, 11 months ago (2014-01-23 16:43:44 UTC) #11
szym
JNI makes no requirement on the file names. The <fully-qualified-class-name-with-underscores>.{h,cpp} is an Android convention. I ...
6 years, 11 months ago (2014-01-23 16:50:30 UTC) #12
mef
On 2014/01/23 16:50:30, szym wrote: > JNI makes no requirement on the file names. The ...
6 years, 11 months ago (2014-01-23 17:40:22 UTC) #13
szym
On 2014/01/23 16:01:59, szym wrote: > We will definitely need a shippable build target -- ...
6 years, 11 months ago (2014-01-24 15:22:57 UTC) #14
mef
Yep. I've added cronet_unittests_apk target and libcronet.so inside of .apk is only 8.5mb (I haven't ...
6 years, 11 months ago (2014-01-24 15:28:17 UTC) #15
mmenke
tools/binary_size/run_binary_size_analysis.py? The original thread where I got that link is https://groups.google.com/a/google.com/forum/#!topic/chrome-perf/g_ua7iQt5ew, and has a link ...
6 years, 11 months ago (2014-01-24 15:34:43 UTC) #16
szym
On 2014/01/24 15:28:17, mef wrote: > Also, do you know whether it is possible to ...
6 years, 11 months ago (2014-01-24 15:37:40 UTC) #17
mef
Nice! https://x20web.corp.google.com/~mef/cronet_size/index.html On Fri, Jan 24, 2014 at 10:37 AM, <szym@chromium.org> wrote: > On 2014/01/24 ...
6 years, 11 months ago (2014-01-24 16:20:07 UTC) #18
szym
On 2014/01/24 16:20:07, mef wrote: > Nice! https://x20web.corp.google.com/%7Emef/cronet_size/index.html > This is pretty sweet. I'm glad ...
6 years, 11 months ago (2014-01-24 16:25:03 UTC) #19
mmenke
That's awesome! Looks like v8's already excluded from the binary, so most of that is ...
6 years, 11 months ago (2014-01-24 16:30:57 UTC) #20
szym
On 2014/01/24 16:30:57, mmenke wrote: > That's awesome! > > Looks like v8's already excluded ...
6 years, 11 months ago (2014-01-24 16:33:36 UTC) #21
Charles
Check out the android makefile that lives in google3's version for the flags that got ...
6 years, 11 months ago (2014-01-24 17:30:32 UTC) #22
mef
On 2014/01/24 17:30:32, clm wrote: > Check out the android makefile that lives in google3's ...
6 years, 11 months ago (2014-01-24 17:43:03 UTC) #23
cbentzel
On 2014/01/24 17:43:03, mef wrote: > On 2014/01/24 17:30:32, clm wrote: > > Check out ...
6 years, 11 months ago (2014-01-26 14:44:06 UTC) #24
szym
I agree. The only thing worth doing in this cl is stripping the symbols so ...
6 years, 11 months ago (2014-01-26 15:29:25 UTC) #25
Charles
Specifically, these flags: LOCAL_CFLAGS := \ -DLOGGING=1 \ -ffunction-sections \ -fdata-sections \ -DCHROMIUM_VERSION="\"$(CHROMIUM_VERSION)\"" \ $(CHROMIUM_DEFINES)LOCAL_CPPFLAGS ...
6 years, 11 months ago (2014-01-26 19:48:29 UTC) #26
mef
On 2014/01/26 14:44:06, cbentzel wrote: > On 2014/01/24 17:43:03, mef wrote: > > On 2014/01/24 ...
6 years, 11 months ago (2014-01-26 21:08:17 UTC) #27
mmenke
On 2014/01/26 21:08:17, mef wrote: > On 2014/01/26 14:44:06, cbentzel wrote: > > On 2014/01/24 ...
6 years, 11 months ago (2014-01-26 23:12:08 UTC) #28
mef
FYI, I'm still working on this CL as open sourcing request is pending. At this ...
6 years, 10 months ago (2014-02-04 21:14:10 UTC) #29
mef
Hi, I've got a response from dannyb@ confirming that there are no issues with open-sourcing ...
6 years, 10 months ago (2014-02-10 16:29:58 UTC) #30
Charles
Just FYI, there are now (a few) tests for it in the javatests/ social net ...
6 years, 10 months ago (2014-02-10 19:28:25 UTC) #31
mef
Hi guys, please take a look, I'll appreciate your comments. This CL builds on buildbots, ...
6 years, 9 months ago (2014-02-27 22:48:07 UTC) #32
mmenke
Quick nits...I sometimes just pointed out one or two cases of something in individual files. ...
6 years, 9 months ago (2014-02-27 23:06:01 UTC) #33
mmenke
Just for the record, these are almost all just reformatting, unused lines, missing headers, and ...
6 years, 9 months ago (2014-02-27 23:16:17 UTC) #34
mmenke
On 2014/02/27 23:16:17, mmenke wrote: > Just for the record, these are almost all just ...
6 years, 9 months ago (2014-02-27 23:18:56 UTC) #35
szym
https://codereview.chromium.org/145213003/diff/1160001/net/cronet/android/org_chromium_net_UrlRequest.cc File net/cronet/android/org_chromium_net_UrlRequest.cc (right): https://codereview.chromium.org/145213003/diff/1160001/net/cronet/android/org_chromium_net_UrlRequest.cc#newcode5 net/cronet/android/org_chromium_net_UrlRequest.cc:5: #include "net/cronet/android/org_chromium_net_UrlRequest.h" After reading some more on the https://code.google.com/p/chromium/codesearch#chromium/src/base/android/jni_generator/ ...
6 years, 9 months ago (2014-02-28 00:50:39 UTC) #36
mef
PTAL. I've addressed most of the nits. I'd prefer to look into using of generated ...
6 years, 9 months ago (2014-03-03 19:15:12 UTC) #37
mmenke
Going to make a couple more tiny nits (Smaller than the last set), but two ...
6 years, 9 months ago (2014-03-03 22:42:26 UTC) #38
mmenke
Just a couple more nits. Once we reach a decision about the copyright dates, I ...
6 years, 9 months ago (2014-03-04 19:36:19 UTC) #39
Charles
FYI, there are some bugs fixed and tests added in google3 since you grabbed this. ...
6 years, 9 months ago (2014-03-04 21:17:39 UTC) #40
mef
On 2014/03/04 21:17:39, clm wrote: > FYI, there are some bugs fixed and tests added ...
6 years, 9 months ago (2014-03-04 22:25:26 UTC) #41
Charles
On Tue, Mar 4, 2014 at 2:25 PM, <mef@chromium.org> wrote: > On 2014/03/04 21:17:39, clm ...
6 years, 9 months ago (2014-03-04 22:33:56 UTC) #42
mef
Tony, could you take a look and comment, especially about usage of synchronized sections in ...
6 years, 9 months ago (2014-03-04 22:39:55 UTC) #43
Charles
On Tue, Mar 4, 2014 at 2:39 PM, <mef@chromium.org> wrote: > Tony, > > could ...
6 years, 9 months ago (2014-03-04 22:50:09 UTC) #44
mef
PTAL. I've addressed all comments and hopefully most of findbugs warnings. What would be a ...
6 years, 9 months ago (2014-03-05 20:54:12 UTC) #45
tonycuadra
lgtm
6 years, 9 months ago (2014-03-05 22:08:19 UTC) #46
tonycuadra
https://codereview.chromium.org/145213003/diff/1260001/net/cronet/android/java/src/org/chromium/net/UrlRequest.java File net/cronet/android/java/src/org/chromium/net/UrlRequest.java (right): https://codereview.chromium.org/145213003/diff/1260001/net/cronet/android/java/src/org/chromium/net/UrlRequest.java#newcode128 net/cronet/android/java/src/org/chromium/net/UrlRequest.java:128: mPostBody = data.clone(); Is this absolutely necessary? In same ...
6 years, 9 months ago (2014-03-05 22:11:32 UTC) #47
Charles
Are you going to add the tests too? https://codereview.chromium.org/145213003/diff/1260001/net/cronet/android/java/src/org/chromium/net/UrlRequest.java File net/cronet/android/java/src/org/chromium/net/UrlRequest.java (right): https://codereview.chromium.org/145213003/diff/1260001/net/cronet/android/java/src/org/chromium/net/UrlRequest.java#newcode128 net/cronet/android/java/src/org/chromium/net/UrlRequest.java:128: mPostBody ...
6 years, 9 months ago (2014-03-05 22:29:35 UTC) #48
mef
On 2014/03/05 22:29:35, clm wrote: > Are you going to add the tests too? I've ...
6 years, 9 months ago (2014-03-05 22:42:18 UTC) #49
mmenke
I'm happy to sign off on landing this once we get consensus on the copyright ...
6 years, 9 months ago (2014-03-06 17:05:44 UTC) #50
mef
On 2014/03/06 17:05:44, mmenke wrote: > I'm happy to sign off on landing this once ...
6 years, 9 months ago (2014-03-06 20:18:05 UTC) #51
mef
PTAL. I've updated the copyright, restored |extern "C"| for proper JNI name mangling and got ...
6 years, 9 months ago (2014-03-06 23:14:24 UTC) #52
mmenke
LGTM, but we'll want to update net/BUILD.gn as well, either in this CL or in ...
6 years, 9 months ago (2014-03-07 16:24:28 UTC) #53
mmenke
And, for the record, by "LGTM" I mean fine to land, but we still should ...
6 years, 9 months ago (2014-03-07 16:30:54 UTC) #54
mef
Thanks! I'm going to land this intial CL with understanding that follow up cleanup, test ...
6 years, 9 months ago (2014-03-07 18:14:20 UTC) #55
mef
The CQ bit was checked by mef@chromium.org
6 years, 9 months ago (2014-03-07 18:15:25 UTC) #56
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mef@chromium.org/145213003/1310001
6 years, 9 months ago (2014-03-07 18:16:49 UTC) #57
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-07 18:23:07 UTC) #58
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel
6 years, 9 months ago (2014-03-07 18:23:08 UTC) #59
mmenke
Er...wait...when you copy a file, you should keep the original copyright date. Just like a ...
6 years, 9 months ago (2014-03-07 18:24:13 UTC) #60
mef
The CQ bit was checked by mef@chromium.org
6 years, 9 months ago (2014-03-07 21:42:45 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mef@chromium.org/145213003/1330001
6 years, 9 months ago (2014-03-07 21:44:48 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mef@chromium.org/145213003/1330001
6 years, 9 months ago (2014-03-08 11:01:00 UTC) #63
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-08 13:57:30 UTC) #64
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) telemetry_perf_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=234294
6 years, 9 months ago (2014-03-08 13:57:31 UTC) #65
mmenke
We shouldn't be landing this yet - looks like we don't have the privacy signoff ...
6 years, 9 months ago (2014-03-10 14:54:27 UTC) #66
mef
The CQ bit was checked by mef@chromium.org
6 years, 9 months ago (2014-03-14 12:57:44 UTC) #67
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mef@chromium.org/145213003/1330001
6 years, 9 months ago (2014-03-14 12:57:49 UTC) #68
commit-bot: I haz the power
Change committed as 257131
6 years, 9 months ago (2014-03-14 16:45:35 UTC) #69
dplotnikov
6 years, 9 months ago (2014-03-17 17:56:00 UTC) #70
Message was sent while issue was closed.
https://codereview.chromium.org/145213003/diff/1230001/net/cronet/android/jav...
File net/cronet/android/java/src/org/chromium/net/UrlRequest.java (right):

https://codereview.chromium.org/145213003/diff/1230001/net/cronet/android/jav...
net/cronet/android/java/src/org/chromium/net/UrlRequest.java:72: private final
ContextLock mLock;
You don't have to use a new class for a lock. "Object" is traditionally used for
locks.

Powered by Google App Engine
This is Rietveld 408576698