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

Issue 2779263002: Set user agent type of transient item the same as pending item. (Closed)

Created:
3 years, 8 months ago by liaoyuke
Modified:
3 years, 8 months ago
CC:
chromium-reviews, ios-reviews+chrome_chromium.org, ios-reviews_chromium.org, pkl (ping after 24h if needed), noyau+watch_chromium.org, marq+watch_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Set user agent type of transient item the same as pending item. In current code, when deciding which user agent type to use for pre-loading next item, the user agent of transient item is also taken into consideration, and because the user agent type of transient item is always MOBILE, this results in the following behavior: Goto www.facebook.com -> Request Desktop Site -> Goto https://expired.badssl.com -> Goto www.amazon.com. Now, instead of visiting the desktop version of www.amazon.com, it's visiting the mobile version. This CL fixes the issue by accurately set the user agent type of transient item as the user agent type of corresponding pending item. BUG=706446 Review-Url: https://codereview.chromium.org/2779263002 Cr-Commit-Position: refs/heads/master@{#461856} Committed: https://chromium.googlesource.com/chromium/src/+/0c1d4036c5f4aafb0530816aafce288cc56a691b

Patch Set 1 #

Patch Set 2 : Addressed self review #

Patch Set 3 : Addressed comments #

Total comments: 4

Patch Set 4 : removed unused includes #

Total comments: 10

Patch Set 5 : Address comments and add unit tests #

Total comments: 2

Patch Set 6 : Remove code duplication #

Total comments: 2

Patch Set 7 : Rebase #

Patch Set 8 : Fix unit tests #

Total comments: 4

Patch Set 9 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -7 lines) Patch
M ios/chrome/browser/ssl/ios_ssl_error_handler_unittest.mm View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M ios/web/interstitials/web_interstitial_impl.mm View 1 2 3 2 chunks +3 lines, -7 lines 0 comments Download
M ios/web/navigation/navigation_manager_impl.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M ios/web/navigation/navigation_manager_impl.mm View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download
M ios/web/navigation/navigation_manager_impl_unittest.mm View 1 2 3 4 5 6 1 chunk +38 lines, -0 lines 0 comments Download
M ios/web/public/test/web_test_with_web_state.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
M ios/web/public/test/web_test_with_web_state.mm View 1 2 3 4 5 6 7 8 2 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 50 (33 generated)
liaoyuke
Hey Eugene, Kurt, PTAL. Thank you very much!
3 years, 8 months ago (2017-03-29 17:39:06 UTC) #5
kkhorimoto
I think a better solution would be to accurately represent the UA type of the ...
3 years, 8 months ago (2017-03-29 21:05:04 UTC) #8
liaoyuke
PTAL. Thank you very much! https://codereview.chromium.org/2779263002/diff/40001/ios/chrome/browser/tabs/tab.mm File ios/chrome/browser/tabs/tab.mm (right): https://codereview.chromium.org/2779263002/diff/40001/ios/chrome/browser/tabs/tab.mm#newcode1481 ios/chrome/browser/tabs/tab.mm:1481: When I changed from ...
3 years, 8 months ago (2017-03-29 22:41:05 UTC) #10
kkhorimoto
https://codereview.chromium.org/2779263002/diff/40001/ios/chrome/browser/tabs/tab.mm File ios/chrome/browser/tabs/tab.mm (right): https://codereview.chromium.org/2779263002/diff/40001/ios/chrome/browser/tabs/tab.mm#newcode1481 ios/chrome/browser/tabs/tab.mm:1481: On 2017/03/29 22:41:05, liaoyuke wrote: > When I changed ...
3 years, 8 months ago (2017-03-30 02:36:46 UTC) #11
liaoyuke
PTAL. Thank you very much! https://codereview.chromium.org/2779263002/diff/40001/ios/web/interstitials/web_interstitial_impl.mm File ios/web/interstitials/web_interstitial_impl.mm (right): https://codereview.chromium.org/2779263002/diff/40001/ios/web/interstitials/web_interstitial_impl.mm#newcode9 ios/web/interstitials/web_interstitial_impl.mm:9: #import "ios/web/navigation/crw_session_controller.h" On 2017/03/30 ...
3 years, 8 months ago (2017-03-30 20:34:36 UTC) #12
kkhorimoto
lgtm
3 years, 8 months ago (2017-03-30 22:55:53 UTC) #13
Eugene But (OOO till 7-30)
https://codereview.chromium.org/2779263002/diff/60001/ios/chrome/browser/tabs/tab.mm File ios/chrome/browser/tabs/tab.mm (right): https://codereview.chromium.org/2779263002/diff/60001/ios/chrome/browser/tabs/tab.mm#newcode1482 ios/chrome/browser/tabs/tab.mm:1482: web::NavigationItem* item = nullptr; How about this?: web::NavigationItem* item ...
3 years, 8 months ago (2017-03-30 23:01:49 UTC) #14
liaoyuke
PTAL. Thank you very much! https://codereview.chromium.org/2779263002/diff/60001/ios/chrome/browser/tabs/tab.mm File ios/chrome/browser/tabs/tab.mm (right): https://codereview.chromium.org/2779263002/diff/60001/ios/chrome/browser/tabs/tab.mm#newcode1482 ios/chrome/browser/tabs/tab.mm:1482: web::NavigationItem* item = nullptr; ...
3 years, 8 months ago (2017-03-31 15:50:12 UTC) #25
Eugene But (OOO till 7-30)
https://codereview.chromium.org/2779263002/diff/120001/ios/chrome/browser/ui/browser_view_controller.mm File ios/chrome/browser/ui/browser_view_controller.mm (right): https://codereview.chromium.org/2779263002/diff/120001/ios/chrome/browser/ui/browser_view_controller.mm#newcode1099 ios/chrome/browser/ui/browser_view_controller.mm:1099: // TODO(crbug.com/707081): Clean this up once the bug is ...
3 years, 8 months ago (2017-03-31 18:06:40 UTC) #26
liaoyuke
PTAL. Thank you very much! https://codereview.chromium.org/2779263002/diff/120001/ios/chrome/browser/ui/browser_view_controller.mm File ios/chrome/browser/ui/browser_view_controller.mm (right): https://codereview.chromium.org/2779263002/diff/120001/ios/chrome/browser/ui/browser_view_controller.mm#newcode1099 ios/chrome/browser/ui/browser_view_controller.mm:1099: // TODO(crbug.com/707081): Clean this ...
3 years, 8 months ago (2017-03-31 18:29:04 UTC) #29
Eugene But (OOO till 7-30)
lgtm! https://codereview.chromium.org/2779263002/diff/180001/ios/web/navigation/navigation_manager_impl.mm File ios/web/navigation/navigation_manager_impl.mm (right): https://codereview.chromium.org/2779263002/diff/180001/ios/web/navigation/navigation_manager_impl.mm#newcode178 ios/web/navigation/navigation_manager_impl.mm:178: DCHECK(GetPendingItem()); nit: No need to DCHECK, the next ...
3 years, 8 months ago (2017-03-31 18:33:00 UTC) #30
liaoyuke
PTAL at the last patch. Thank you very much! https://codereview.chromium.org/2779263002/diff/180001/ios/web/navigation/navigation_manager_impl.mm File ios/web/navigation/navigation_manager_impl.mm (right): https://codereview.chromium.org/2779263002/diff/180001/ios/web/navigation/navigation_manager_impl.mm#newcode178 ios/web/navigation/navigation_manager_impl.mm:178: ...
3 years, 8 months ago (2017-04-04 17:25:01 UTC) #41
Eugene But (OOO till 7-30)
lgtm https://codereview.chromium.org/2779263002/diff/260001/ios/web/public/test/web_test_with_web_state.h File ios/web/public/test/web_test_with_web_state.h (right): https://codereview.chromium.org/2779263002/diff/260001/ios/web/public/test/web_test_with_web_state.h#newcode54 ios/web/public/test/web_test_with_web_state.h:54: void AddPendingItem(const GURL& url, ui::PageTransition transition); Could you ...
3 years, 8 months ago (2017-04-04 18:22:31 UTC) #42
liaoyuke
Thank you very much for reviewing! https://codereview.chromium.org/2779263002/diff/260001/ios/web/public/test/web_test_with_web_state.h File ios/web/public/test/web_test_with_web_state.h (right): https://codereview.chromium.org/2779263002/diff/260001/ios/web/public/test/web_test_with_web_state.h#newcode54 ios/web/public/test/web_test_with_web_state.h:54: void AddPendingItem(const GURL& ...
3 years, 8 months ago (2017-04-04 21:15:40 UTC) #43
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/2779263002/280001
3 years, 8 months ago (2017-04-04 21:16:37 UTC) #46
commit-bot: I haz the power
Committed patchset #9 (id:280001) as https://chromium.googlesource.com/chromium/src/+/0c1d4036c5f4aafb0530816aafce288cc56a691b
3 years, 8 months ago (2017-04-04 21:58:41 UTC) #49
liaoyuke
3 years, 8 months ago (2017-04-05 05:24:41 UTC) #50
Message was sent while issue was closed.
A revert of this CL (patchset #9 id:280001) has been created in
https://codereview.chromium.org/2798813002/ by liaoyuke@chromium.org.

The reason for reverting is: Revert because this CL is breaking downstream
tests..

Powered by Google App Engine
This is Rietveld 408576698