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

Issue 1989963003: Set User-Agent and Accept-Language request headers for PWS requests (Closed)

Created:
4 years, 7 months ago by mattreynolds
Modified:
4 years, 6 months ago
CC:
chromium-reviews, mmocny
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Set User-Agent and Accept-Language request headers for PWS requests The HTTP request headers normally used by Chrome for Android are generated in the native layer. We do not want to load native when the Physical Web is resolving URLs in the background, so we cannot access these values directly. Instead, they are reconstructed from values accessible from the Java layer. BUG=607660 Committed: https://crrev.com/6bf0bb56d7536accdddeaf0429de7e619953e367 Cr-Commit-Position: refs/heads/master@{#398120}

Patch Set 1 #

Patch Set 2 : read Accept-Language from components_locale_settings.grd #

Patch Set 3 : add tests #

Total comments: 18

Patch Set 4 : changes for nyquist@ #

Total comments: 4

Patch Set 5 : remove http_util.cc comment #

Total comments: 2

Patch Set 6 : add note regarding language list #

Patch Set 7 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+462 lines, -10 lines) Patch
M chrome/android/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/physicalweb/BitmapHttpRequest.java View 1 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/physicalweb/HttpRequest.java View 1 2 chunks +15 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/physicalweb/JsonObjectHttpRequest.java View 1 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/physicalweb/ListUrlsActivity.java View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PwsClientImpl.java View 1 2 3 4 5 6 chunks +165 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/physicalweb/UrlManager.java View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/java_sources.gni View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A chrome/android/javatests/src/org/chromium/chrome/browser/physicalweb/PwsClientImplTest.java View 1 2 3 1 chunk +145 lines, -0 lines 0 comments Download
M chrome/browser/android/preferences/pref_service_bridge.cc View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M components/components_locale_settings.grd View 1 2 chunks +51 lines, -1 line 0 comments Download
M components/strings/BUILD.gn View 1 2 3 2 chunks +66 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (9 generated)
cco3
On 2016/05/20 22:09:21, mattreynolds wrote: > mailto:mattreynolds@chromium.org changed reviewers: > + mailto:cco3@chromium.org LGTM, thanks for ...
4 years, 7 months ago (2016-05-23 18:10:03 UTC) #3
mattreynolds
blundell@chromium.org: Please review changes in components/* nyquist@chromium.org: Please review changes in chrome/android/*
4 years, 7 months ago (2016-05-24 17:57:18 UTC) #5
blundell
On 2016/05/24 17:57:18, mattreynolds wrote: > mailto:blundell@chromium.org: Please review changes in components/* > > mailto:nyquist@chromium.org: ...
4 years, 7 months ago (2016-05-25 09:03:09 UTC) #6
mattreynolds
Hi Sylvain, please take a look at components/*. I'm trying to make components_locale_settings strings (specifically ...
4 years, 7 months ago (2016-05-25 17:23:05 UTC) #8
sdefresne
components/ lgtm
4 years, 7 months ago (2016-05-25 17:29:56 UTC) #9
nyquist
https://codereview.chromium.org/1989963003/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PwsClientImpl.java File chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PwsClientImpl.java (right): https://codereview.chromium.org/1989963003/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PwsClientImpl.java#newcode48 chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PwsClientImpl.java:48: private static String sUserAgent; These are lazily initialized, so ...
4 years, 7 months ago (2016-05-25 22:02:48 UTC) #10
mattreynolds
asanka@chromium.org: Please review changes in net/* https://codereview.chromium.org/1989963003/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PwsClientImpl.java File chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PwsClientImpl.java (right): https://codereview.chromium.org/1989963003/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PwsClientImpl.java#newcode48 chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PwsClientImpl.java:48: private static String ...
4 years, 7 months ago (2016-05-26 00:31:45 UTC) #12
nyquist
lgtm
4 years, 7 months ago (2016-05-26 22:38:30 UTC) #13
mattreynolds
Hi asanka@, PTAL
4 years, 7 months ago (2016-05-26 22:45:58 UTC) #14
asanka
https://codereview.chromium.org/1989963003/diff/60001/net/http/http_util.cc File net/http/http_util.cc (right): https://codereview.chromium.org/1989963003/diff/60001/net/http/http_util.cc#newcode761 net/http/http_util.cc:761: // The two implementations should be kept in sync. ...
4 years, 6 months ago (2016-05-27 16:57:59 UTC) #15
mattreynolds
https://codereview.chromium.org/1989963003/diff/60001/net/http/http_util.cc File net/http/http_util.cc (right): https://codereview.chromium.org/1989963003/diff/60001/net/http/http_util.cc#newcode761 net/http/http_util.cc:761: // The two implementations should be kept in sync. ...
4 years, 6 months ago (2016-05-27 17:24:11 UTC) #16
asanka
https://codereview.chromium.org/1989963003/diff/60001/net/http/http_util.cc File net/http/http_util.cc (right): https://codereview.chromium.org/1989963003/diff/60001/net/http/http_util.cc#newcode761 net/http/http_util.cc:761: // The two implementations should be kept in sync. ...
4 years, 6 months ago (2016-06-01 20:10:27 UTC) #17
mattreynolds
https://codereview.chromium.org/1989963003/diff/60001/net/http/http_util.cc File net/http/http_util.cc (right): https://codereview.chromium.org/1989963003/diff/60001/net/http/http_util.cc#newcode761 net/http/http_util.cc:761: // The two implementations should be kept in sync. ...
4 years, 6 months ago (2016-06-01 22:02:49 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1989963003/120001
4 years, 6 months ago (2016-06-06 17:34:35 UTC) #21
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 6 months ago (2016-06-06 21:00:40 UTC) #23
commit-bot: I haz the power
4 years, 6 months ago (2016-06-06 21:02:45 UTC) #25
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/6bf0bb56d7536accdddeaf0429de7e619953e367
Cr-Commit-Position: refs/heads/master@{#398120}

Powered by Google App Engine
This is Rietveld 408576698