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

Issue 1236283002: [Android] Remove deprecated SysInfo property retrieval (Closed)

Created:
5 years, 5 months ago by jdduke (slow)
Modified:
5 years, 2 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, sadrul, jam, darin-cc_chromium.org, piman+watch_chromium.org, kalyank, erikwright+watch_chromium.org, tdresser, Alexei Svitkine (slow)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Android] Remove deprecated SysInfo property retrieval Android's SysInfo implementation currently uses an internal, hidden API. This is not safe. Switch all relevant SysInfo methods to use their BuildInfo counterpart, which uses sanctioned approaches for fetching the same values. BUG=392191

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 3

Patch Set 3 : Code review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -139 lines) Patch
M base/android/build_info.h View 3 chunks +21 lines, -6 lines 0 comments Download
M base/android/build_info.cc View 2 chunks +8 lines, -3 lines 0 comments Download
M base/android/java/src/org/chromium/base/BuildInfo.java View 1 2 4 chunks +19 lines, -2 lines 0 comments Download
M base/sys_info.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M base/sys_info_android.cc View 1 2 6 chunks +12 lines, -120 lines 0 comments Download
M chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/crash/app/breakpad_linux.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M components/metrics/metrics_log.cc View 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/gpu/gpu_process_host.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 27 (8 generated)
jdduke (slow)
+dfalcantara@ to make sure I'm getting the mappings right. +thakis@ for base/. https://codereview.chromium.org/1236283002/diff/40001/base/android/build_info.h File base/android/build_info.h ...
5 years, 5 months ago (2015-07-20 19:59:24 UTC) #3
jdduke (slow)
+nyquist for base/android -thakis, +thestig for the rest of base/
5 years, 4 months ago (2015-08-05 00:03:35 UTC) #5
Lei Zhang
base/ lgtm if nyquist@ agrees. chrome/ and components/crash lgtm https://codereview.chromium.org/1236283002/diff/40001/base/sys_info_android.cc File base/sys_info_android.cc (right): https://codereview.chromium.org/1236283002/diff/40001/base/sys_info_android.cc#newcode54 base/sys_info_android.cc:54: ...
5 years, 4 months ago (2015-08-05 00:28:24 UTC) #6
Lei Zhang
BTW, is bug 509018 the right bug? It looks somewhat related but is already marked ...
5 years, 4 months ago (2015-08-05 00:29:21 UTC) #7
jdduke (slow)
On 2015/08/05 00:29:21, Lei Zhang wrote: > BTW, is bug 509018 the right bug? It ...
5 years, 4 months ago (2015-08-05 02:46:24 UTC) #8
Alexei Svitkine (slow)
components/metrics lgtm
5 years, 4 months ago (2015-08-05 15:21:30 UTC) #10
jdduke (slow)
+sievers for content/browser/gpu
5 years, 4 months ago (2015-08-05 15:29:20 UTC) #12
jdduke (slow)
https://codereview.chromium.org/1236283002/diff/40001/base/sys_info_android.cc File base/sys_info_android.cc (right): https://codereview.chromium.org/1236283002/diff/40001/base/sys_info_android.cc#newcode54 base/sys_info_android.cc:54: LOG(ERROR) << "Invalid large memory class: " << result; ...
5 years, 4 months ago (2015-08-05 15:32:09 UTC) #13
no sievers
On 2015/08/05 15:29:20, jdduke wrote: > +sievers for content/browser/gpu lgtm
5 years, 4 months ago (2015-08-05 17:29:13 UTC) #14
nyquist
base/android lgtm
5 years, 4 months ago (2015-08-06 06:42:26 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1236283002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1236283002/60001
5 years, 4 months ago (2015-08-06 13:11:53 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_arm64_dbg_recipe/builds/104208)
5 years, 4 months ago (2015-08-06 13:51:59 UTC) #20
jdduke (slow)
Hmm. Looks like there's a remaining __system_property_get dependency in dns_config_service_posix.cc, so we'll either need to ...
5 years, 4 months ago (2015-08-06 15:25:02 UTC) #21
jdduke (slow)
Hmm. Looks like there's a remaining __system_property_get dependency in dns_config_service_posix.cc, so we'll either need to ...
5 years, 4 months ago (2015-08-06 15:25:02 UTC) #22
jdduke (slow)
Hmm. Looks like there's a remaining __system_property_get dependency in dns_config_service_posix.cc, so we'll either need to ...
5 years, 4 months ago (2015-08-06 15:25:04 UTC) #23
jdduke (slow)
Hmm. Looks like there's a remaining __system_property_get dependency in dns_config_service_posix.cc, so we'll either need to ...
5 years, 4 months ago (2015-08-06 15:25:04 UTC) #24
jdduke (slow)
Hmm. Looks like there's a remaining __system_property_get dependency in dns_config_service_posix.cc, so we'll either need to ...
5 years, 4 months ago (2015-08-06 15:26:45 UTC) #25
jdduke (slow)
On 2015/08/06 15:26:45, jdduke wrote: > Hmm. Looks like there's a remaining __system_property_get dependency in ...
5 years, 4 months ago (2015-08-06 15:34:47 UTC) #26
Deprecated (see juliatuttle)
5 years, 4 months ago (2015-08-07 20:56:05 UTC) #27
On 2015/08/06 15:34:47, jdduke wrote:
> On 2015/08/06 15:26:45, jdduke wrote:
> > Hmm. Looks like there's a remaining __system_property_get dependency in
> > dns_config_service_posix.cc, so we'll either need to move the dlsym
workaround
> > there or modify ReadDnsConfig to get the values differently.
> > 
> > ttuttle@: I notice you have a TODO there to fix the usage, any thoughts?
> 
> I guess we could built a lightweight JNI wrapper for the Java System class,
> letting us use the static 'System.getProperty' directly. Not ideal, but should
> be fine for infrequent use.

My plan was to hook into Android's networking stuff in a similar way, but that
doesn't work on older versions (the data isn't available for non-wifi networks).
I think your idea sounds good if we still need this data. It's useful for the
improved DNS error pages, at least.

Powered by Google App Engine
This is Rietveld 408576698