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

Issue 2215903002: Add missing using declarations in cronet code. (Closed)

Created:
4 years, 4 months ago by Torne
Modified:
4 years, 4 months ago
Reviewers:
Mike West, mef
CC:
cbentzel+watch_chromium.org, chromium-reviews, jshin+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@fix-cronet
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add missing using declarations in cronet code. Currently jni_generator_helper.h includes a using statement for JavaParamRef and ScopedJavaLocalRef. To allow this to be removed (since it shouldn't really be there in a header file), add a "using" statement to cronet-specific files that do this (already removed for other android configs). BUG=568574 Committed: https://crrev.com/bc8890f04a40ef61b0f3b02e08a0fe6980aa81f5 Cr-Commit-Position: refs/heads/master@{#410032}

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -0 lines) Patch
M components/cronet/android/chromium_url_request.cc View 1 chunk +2 lines, -0 lines 1 comment Download
M components/cronet/android/chromium_url_request_context.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M components/cronet/android/cronet_bidirectional_stream_adapter.cc View 1 chunk +1 line, -0 lines 0 comments Download
M components/cronet/android/cronet_library_loader.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M components/cronet/android/cronet_upload_data_stream_adapter.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M components/cronet/android/cronet_url_request_adapter.cc View 1 chunk +1 line, -0 lines 0 comments Download
M components/cronet/android/cronet_url_request_context_adapter.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M components/cronet/android/test/cronet_test_util.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M components/cronet/android/test/cronet_url_request_context_config_test.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M components/cronet/android/test/mock_cert_verifier.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M components/cronet/android/test/mock_url_request_job_factory.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M components/cronet/android/test/native_test_server.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M components/cronet/android/test/network_change_notifier_util.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M components/cronet/android/test/quic_test_server.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M components/cronet/android/test/sdch_test_util.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M components/cronet/android/test/test_upload_data_stream_handler.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M net/base/net_string_util_icu_alternatives_android.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M url/url_canon_icu_alternatives_android.cc View 1 chunk +2 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 21 (6 generated)
Torne
While debugging that build breakage I realised a totally different change I'm working on was ...
4 years, 4 months ago (2016-08-04 17:05:40 UTC) #2
mef
https://codereview.chromium.org/2215903002/diff/1/components/cronet/android/chromium_url_request.cc File components/cronet/android/chromium_url_request.cc (right): https://codereview.chromium.org/2215903002/diff/1/components/cronet/android/chromium_url_request.cc#newcode19 components/cronet/android/chromium_url_request.cc:19: using base::android::JavaParamRef; I think we need to add #include ...
4 years, 4 months ago (2016-08-04 17:26:00 UTC) #3
Torne
On 2016/08/04 17:26:00, mef wrote: > https://codereview.chromium.org/2215903002/diff/1/components/cronet/android/chromium_url_request.cc > File components/cronet/android/chromium_url_request.cc (right): > > https://codereview.chromium.org/2215903002/diff/1/components/cronet/android/chromium_url_request.cc#newcode19 > ...
4 years, 4 months ago (2016-08-04 18:24:16 UTC) #4
mef
reluctantly lgtm.
4 years, 4 months ago (2016-08-04 18:53:08 UTC) #5
Torne
On 2016/08/04 18:53:08, mef wrote: > reluctantly lgtm. I can script including this where necessary ...
4 years, 4 months ago (2016-08-04 19:06:23 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2215903002/1
4 years, 4 months ago (2016-08-04 19:44:14 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/231363)
4 years, 4 months ago (2016-08-04 19:54:14 UTC) #10
Torne
+mkwst for url OWNERS
4 years, 4 months ago (2016-08-04 20:05:43 UTC) #12
Mike West
LGTM.
4 years, 4 months ago (2016-08-05 10:54:13 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2215903002/1
4 years, 4 months ago (2016-08-05 11:17:11 UTC) #15
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 4 months ago (2016-08-05 11:49:03 UTC) #16
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/bc8890f04a40ef61b0f3b02e08a0fe6980aa81f5 Cr-Commit-Position: refs/heads/master@{#410032}
4 years, 4 months ago (2016-08-05 11:51:18 UTC) #18
Torne
On 2016/08/04 19:06:23, Torne wrote: > On 2016/08/04 18:53:08, mef wrote: > > reluctantly lgtm. ...
4 years, 4 months ago (2016-08-05 12:13:44 UTC) #19
mef
On 2016/08/05 12:13:44, Torne wrote: > On 2016/08/04 19:06:23, Torne wrote: > > On 2016/08/04 ...
4 years, 4 months ago (2016-08-05 13:29:08 UTC) #20
Torne
4 years, 4 months ago (2016-08-05 13:31:06 UTC) #21
Message was sent while issue was closed.
On 2016/08/05 13:29:08, mef wrote:
> On 2016/08/05 12:13:44, Torne wrote:
> > On 2016/08/04 19:06:23, Torne wrote:
> > > On 2016/08/04 18:53:08, mef wrote:
> > > > reluctantly lgtm.
> > > 
> > > I can script including this where necessary after this round of cleanups
if
> > you
> > > want, but chromium isn't using IWYU tooling in general and so it's
> inevitably
> > > going to regress as people add new JNI classes. I can't remove the
> transitive
> > > include as the generated JNI headers need access to the actual contents of
> the
> > > type, so any source file that includes a JNI header is always going to be
> able
> > > to get away without including scoped_java_ref.h :/
> > 
> > I tried doing this and I can produce a CL that adds an #include in all the
> > places that reference the types but don't already include the header in
their
> > .cc or .h (182 files) but I'm not sure it's actually necessary/desirable to
> add
> > an include in all cases - for some of them a forward declaration probably
> would
> > suffice (especially headers), and I can't think of a very simple way to
> > determine this since it compiles in any case due to the transitive
inclusions.
> > 
> > If IWYU actually worked on chromium it would be able to do it, I guess, but
it
> > doesn't look like it's being worked on right now.
> > 
> > What do you think?
> 
> Sorry for being PITA, and thanks for doing this!

It's totally fine; *because* i did it in a very simple way it only took ten
minutes to try. :)

> I agree that this would add more unnecessary overhead without clear benefit.
> I guess we should just leave it as is.

Powered by Google App Engine
This is Rietveld 408576698