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

Issue 10832235: Move Android user agent generation to native code (Closed)

Created:
8 years, 4 months ago by gone
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, sschmitz
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Move Android user agent generation to native code Gets rid of a pathway that forced us to set the user agent from the Java side, replacing it with one that's entirely native. Functions have been added to base to allow accessing information about the device and Android build, while the user agent generation code was moved to the webkit_glue namespace. BUG=131312 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=152675

Patch Set 1 #

Patch Set 2 : Formatting #

Total comments: 2

Patch Set 3 : Nit fixes #

Total comments: 4

Patch Set 4 : Moved Android OS info function over to webkit_glue #

Total comments: 13

Patch Set 5 : Addressing jar's comments #

Patch Set 6 : More addressing #

Patch Set 7 : Moved back to base #

Patch Set 8 : Moving back to webkit_glue again #

Patch Set 9 : Removed unnecessary include #

Total comments: 4

Patch Set 10 : Nit fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -133 lines) Patch
M base/sys_info.h View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
M base/sys_info_android.cc View 1 2 3 4 5 6 7 8 9 2 chunks +62 lines, -0 lines 0 comments Download
M content/app/android/app_jni_registrar.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M content/app/android/content_main.cc View 2 chunks +0 lines, -3 lines 0 comments Download
D content/app/android/user_agent.h View 1 chunk +0 lines, -21 lines 0 comments Download
D content/app/android/user_agent.cc View 1 chunk +0 lines, -30 lines 0 comments Download
M content/content_app.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
M content/content_jni.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -1 line 0 comments Download
D content/public/android/java/src/org/chromium/content/app/UserAgent.java View 1 chunk +0 lines, -50 lines 0 comments Download
M webkit/glue/user_agent.h View 4 1 chunk +0 lines, -7 lines 0 comments Download
M webkit/glue/user_agent.cc View 1 2 3 4 5 6 7 6 chunks +30 lines, -17 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
gone
This is part of a set of CLs that changes how Android user agents are ...
8 years, 4 months ago (2012-08-10 01:17:55 UTC) #1
Yaron
android-y parts lgtm
8 years, 4 months ago (2012-08-14 01:44:44 UTC) #2
jamesr
webkit/ LGTM
8 years, 4 months ago (2012-08-14 02:06:50 UTC) #3
Charlie Reis
LGTM. Happy to see it moving out of content. Just curious about whether this will ...
8 years, 4 months ago (2012-08-14 17:07:16 UTC) #4
gone
https://chromiumcodereview.appspot.com/10832235/diff/3001/base/sys_info.h File base/sys_info.h (right): https://chromiumcodereview.appspot.com/10832235/diff/3001/base/sys_info.h#newcode85 base/sys_info.h:85: static std::string OperatingSystemInformation(); On 2012/08/14 17:07:16, creis wrote: > ...
8 years, 4 months ago (2012-08-14 17:31:01 UTC) #5
gone
Added base OWNERS; wasn't sure who specifically to ping.
8 years, 4 months ago (2012-08-14 17:33:25 UTC) #6
willchan no longer on Chromium
https://chromiumcodereview.appspot.com/10832235/diff/3003/base/sys_info.h File base/sys_info.h (right): https://chromiumcodereview.appspot.com/10832235/diff/3003/base/sys_info.h#newcode54 base/sys_info.h:54: #if defined(OS_ANDROID) Why does this live here instead of ...
8 years, 4 months ago (2012-08-14 17:51:09 UTC) #7
gone
https://chromiumcodereview.appspot.com/10832235/diff/3003/base/sys_info.h File base/sys_info.h (right): https://chromiumcodereview.appspot.com/10832235/diff/3003/base/sys_info.h#newcode54 base/sys_info.h:54: #if defined(OS_ANDROID) On 2012/08/14 17:51:09, willchan wrote: > Why ...
8 years, 4 months ago (2012-08-14 17:58:37 UTC) #8
gone
+klobag as FYI for the user agent string changes Moved the bulk of the OS ...
8 years, 4 months ago (2012-08-15 21:04:22 UTC) #9
jamesr
https://chromiumcodereview.appspot.com/10832235/diff/3004/webkit/glue/user_agent.h File webkit/glue/user_agent.h (right): https://chromiumcodereview.appspot.com/10832235/diff/3004/webkit/glue/user_agent.h#newcode20 webkit/glue/user_agent.h:20: std::string BuildOSCpuInfoForAndroid(); why is this publicly exposed as a ...
8 years, 4 months ago (2012-08-15 21:07:50 UTC) #10
gone
On 2012/08/15 21:07:50, jamesr wrote: > https://chromiumcodereview.appspot.com/10832235/diff/3004/webkit/glue/user_agent.h > File webkit/glue/user_agent.h (right): > > https://chromiumcodereview.appspot.com/10832235/diff/3004/webkit/glue/user_agent.h#newcode20 > ...
8 years, 4 months ago (2012-08-15 21:12:01 UTC) #11
jamesr
I don't think you should add non-user-agent related code to webkit/glue/user_agent.h. I also dislike speculatively ...
8 years, 4 months ago (2012-08-15 21:15:57 UTC) #12
gone
Bigger picture is that BuildOSCpuInfo will have to return two different strings for Android: one ...
8 years, 4 months ago (2012-08-15 21:27:04 UTC) #13
gone
For context, the string generated by that function is used in chrome/browser/ui/webui/about_ui.cc downstream and is ...
8 years, 4 months ago (2012-08-15 21:37:14 UTC) #14
jamesr
It's used as part of the user agent, but what does that substring "(Linux; Android ...
8 years, 4 months ago (2012-08-15 21:40:22 UTC) #15
gone
On 2012/08/15 21:40:22, jamesr wrote: > It's used as part of the user agent, but ...
8 years, 4 months ago (2012-08-15 21:52:39 UTC) #16
jamesr
On 2012/08/15 21:52:39, dfalcantara wrote: > On 2012/08/15 21:40:22, jamesr wrote: > > It's used ...
8 years, 4 months ago (2012-08-15 22:26:17 UTC) #17
gone
> So this code: > http://code.google.com/searchframe#OAMlx_jo-ck/src/chrome/common/chrome_version_info.cc&exact_package=chromium&q=about_version&l=115 > ? Why does your string need to be ...
8 years, 4 months ago (2012-08-15 22:52:06 UTC) #18
gone
On 2012/08/15 22:52:06, dfalcantara wrote: > > So this code: > > > http://code.google.com/searchframe#OAMlx_jo-ck/src/chrome/common/chrome_version_info.cc&exact_package=chromium&q=about_version&l=115 > ...
8 years, 4 months ago (2012-08-15 22:53:03 UTC) #19
jamesr
That crbug seems misguided to me. I would argue that about:version should list "OS: Android" ...
8 years, 4 months ago (2012-08-15 22:59:09 UTC) #20
srikanth
On 2012/08/15 22:59:09, jamesr wrote: > That crbug seems misguided to me. I would argue ...
8 years, 4 months ago (2012-08-15 23:08:48 UTC) #21
jamesr
On 2012/08/15 23:08:48, srikanth wrote: > On 2012/08/15 22:59:09, jamesr wrote: > > That crbug ...
8 years, 4 months ago (2012-08-15 23:10:33 UTC) #22
jar (doing other things)
https://chromiumcodereview.appspot.com/10832235/diff/3004/base/sys_info.h File base/sys_info.h (right): https://chromiumcodereview.appspot.com/10832235/diff/3004/base/sys_info.h#newcode102 base/sys_info.h:102: static const int kDefaultAndroidBugfixVersion = 3; Why isn't this ...
8 years, 4 months ago (2012-08-15 23:35:17 UTC) #23
gone
Uploaded another patch set addressing jar's comments and guarding all of the code for Android ...
8 years, 4 months ago (2012-08-16 00:29:31 UTC) #24
gone
Based on discussion: * The code for generating the string has been fully meshed into ...
8 years, 4 months ago (2012-08-17 00:26:19 UTC) #25
jamesr
webkit/ lgtm
8 years, 4 months ago (2012-08-20 22:59:06 UTC) #26
willchan no longer on Chromium
base/ LGTM https://chromiumcodereview.appspot.com/10832235/diff/14021/base/sys_info_android.cc File base/sys_info_android.cc (right): https://chromiumcodereview.appspot.com/10832235/diff/14021/base/sys_info_android.cc#newcode28 base/sys_info_android.cc:28: if (strlen(os_version_str) > 0) { How about: ...
8 years, 4 months ago (2012-08-20 23:07:42 UTC) #27
Yaron
lgtm Feel free to do as a follow-up https://chromiumcodereview.appspot.com/10832235/diff/14021/base/sys_info_android.cc File base/sys_info_android.cc (right): https://chromiumcodereview.appspot.com/10832235/diff/14021/base/sys_info_android.cc#newcode87 base/sys_info_android.cc:87: char ...
8 years, 4 months ago (2012-08-20 23:13:10 UTC) #28
Charlie Reis
Still LGTM.
8 years, 4 months ago (2012-08-21 01:05:01 UTC) #29
gone
Thanks for the reviews, sending it up. https://chromiumcodereview.appspot.com/10832235/diff/14021/base/sys_info_android.cc File base/sys_info_android.cc (right): https://chromiumcodereview.appspot.com/10832235/diff/14021/base/sys_info_android.cc#newcode28 base/sys_info_android.cc:28: if (strlen(os_version_str) ...
8 years, 4 months ago (2012-08-21 18:46:46 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dfalcantara@chromium.org/10832235/8035
8 years, 4 months ago (2012-08-21 18:48:51 UTC) #31
commit-bot: I haz the power
Try job failure for 10832235-8035 (retry) on mac_rel for step "browser_tests". It's a second try, ...
8 years, 4 months ago (2012-08-21 20:27:52 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dfalcantara@chromium.org/10832235/8035
8 years, 4 months ago (2012-08-21 20:46:39 UTC) #33
commit-bot: I haz the power
8 years, 4 months ago (2012-08-21 23:55:55 UTC) #34
Change committed as 152675

Powered by Google App Engine
This is Rietveld 408576698