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

Issue 2794723002: Create new pending item if UserAgentOverrideOption is not INHERIT. (Closed)

Created:
3 years, 8 months ago by liaoyuke
Modified:
3 years, 8 months ago
CC:
chromium-reviews, Eugene But (OOO till 7-30), cbentzel+watch_chromium.org, ios-reviews+web_chromium.org, ios-reviews_chromium.org, net-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Create new pending item if UserAgentOverrideOption is not INHERIT. The original logic in |AddPendingItem| does nothing if the URL of the pending item is the same as the last committed item, except that the pending item is added due to form submission. However, this doesn't work with the new Request Desktop/Mobile Site because the new functionality requires adding a pending item with the same URL, but different UserAgentType. This CL re-factors |AddPendingItem| so that a pending item with the same URL can be added successfully as long as the UserAgentOverrideOption is not INHEIRT. This CL also adds corresponding unit tests to test the logic. BUG=678047 Review-Url: https://codereview.chromium.org/2794723002 Cr-Commit-Position: refs/heads/master@{#462932} Committed: https://chromium.googlesource.com/chromium/src/+/fbb84a320edb0492eb645530d3b20e9c5ab454ad

Patch Set 1 #

Patch Set 2 : self review #

Total comments: 2

Patch Set 3 : Address comments #

Total comments: 23

Patch Set 4 : Address comments #

Total comments: 5

Patch Set 5 : Address comments #

Patch Set 6 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+799 lines, -325 lines) Patch
M ios/web/navigation/crw_session_controller.h View 1 2 3 2 chunks +11 lines, -7 lines 0 comments Download
M ios/web/navigation/crw_session_controller.mm View 1 2 3 4 5 4 chunks +87 lines, -31 lines 0 comments Download
M ios/web/navigation/crw_session_controller_unittest.mm View 1 2 3 36 chunks +353 lines, -281 lines 0 comments Download
M ios/web/navigation/navigation_manager_impl.mm View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M ios/web/navigation/navigation_manager_impl_unittest.mm View 1 2 3 4 5 2 chunks +340 lines, -1 line 0 comments Download
M ios/web/net/crw_ssl_status_updater_unittest.mm View 1 chunk +6 lines, -4 lines 0 comments Download

Messages

Total messages: 26 (13 generated)
liaoyuke
Hey Eugene, Kurt, PTAL. My original intention was to move the shouldCreatePendingItem logic from CRWSessionController ...
3 years, 8 months ago (2017-04-03 19:47:42 UTC) #3
liaoyuke
Hey Kurt, Could you please also take a look at this CL? Thank you very ...
3 years, 8 months ago (2017-04-05 22:37:52 UTC) #4
liaoyuke
On 2017/04/05 22:37:52, liaoyuke wrote: > Hey Kurt, > > Could you please also take ...
3 years, 8 months ago (2017-04-05 23:00:18 UTC) #5
kkhorimoto
https://codereview.chromium.org/2794723002/diff/20001/ios/web/navigation/crw_session_controller.mm File ios/web/navigation/crw_session_controller.mm (right): https://codereview.chromium.org/2794723002/diff/20001/ios/web/navigation/crw_session_controller.mm#newcode318 ios/web/navigation/crw_session_controller.mm:318: web::NavigationManager::UserAgentOverrideOption::INHERIT) I think we should also check whether the ...
3 years, 8 months ago (2017-04-05 23:01:44 UTC) #6
liaoyuke
PTAL. Thank you very much! https://codereview.chromium.org/2794723002/diff/20001/ios/web/navigation/crw_session_controller.mm File ios/web/navigation/crw_session_controller.mm (right): https://codereview.chromium.org/2794723002/diff/20001/ios/web/navigation/crw_session_controller.mm#newcode318 ios/web/navigation/crw_session_controller.mm:318: web::NavigationManager::UserAgentOverrideOption::INHERIT) On 2017/04/05 23:01:44, ...
3 years, 8 months ago (2017-04-06 22:24:55 UTC) #7
kkhorimoto
lgtm with a couple nits https://codereview.chromium.org/2794723002/diff/40001/ios/web/navigation/crw_session_controller.mm File ios/web/navigation/crw_session_controller.mm (right): https://codereview.chromium.org/2794723002/diff/40001/ios/web/navigation/crw_session_controller.mm#newcode313 ios/web/navigation/crw_session_controller.mm:313: Remove this newline. https://codereview.chromium.org/2794723002/diff/40001/ios/web/navigation/crw_session_controller.mm#newcode319 ...
3 years, 8 months ago (2017-04-06 22:36:19 UTC) #8
Eugene But (OOO till 7-30)
Thank you for awesome test coverage! https://codereview.chromium.org/2794723002/diff/40001/ios/web/navigation/crw_session_controller.mm File ios/web/navigation/crw_session_controller.mm (right): https://codereview.chromium.org/2794723002/diff/40001/ios/web/navigation/crw_session_controller.mm#newcode314 ios/web/navigation/crw_session_controller.mm:314: DCHECK(userAgentOverrideOption != Please ...
3 years, 8 months ago (2017-04-06 22:53:17 UTC) #9
liaoyuke
PTAL. Thank you very much! https://codereview.chromium.org/2794723002/diff/40001/ios/web/navigation/crw_session_controller.mm File ios/web/navigation/crw_session_controller.mm (right): https://codereview.chromium.org/2794723002/diff/40001/ios/web/navigation/crw_session_controller.mm#newcode313 ios/web/navigation/crw_session_controller.mm:313: On 2017/04/06 22:36:19, kkhorimoto_ ...
3 years, 8 months ago (2017-04-07 15:49:08 UTC) #11
Eugene But (OOO till 7-30)
lgtm! https://codereview.chromium.org/2794723002/diff/40001/ios/web/navigation/navigation_manager_impl_unittest.mm File ios/web/navigation/navigation_manager_impl_unittest.mm (right): https://codereview.chromium.org/2794723002/diff/40001/ios/web/navigation/navigation_manager_impl_unittest.mm#newcode535 ios/web/navigation/navigation_manager_impl_unittest.mm:535: EXPECT_EQ(new_url, navigation_manager()->GetPendingItem()->GetURL()); On 2017/04/07 15:49:08, liaoyuke wrote: > ...
3 years, 8 months ago (2017-04-07 16:16:40 UTC) #12
kkhorimoto
https://codereview.chromium.org/2794723002/diff/80001/ios/web/navigation/crw_session_controller.mm File ios/web/navigation/crw_session_controller.mm (right): https://codereview.chromium.org/2794723002/diff/80001/ios/web/navigation/crw_session_controller.mm#newcode305 ios/web/navigation/crw_session_controller.mm:305: if (_navigationManager && _navigationManager->GetFacadeDelegate()) On 2017/04/07 16:16:40, Eugene But ...
3 years, 8 months ago (2017-04-07 17:18:11 UTC) #13
liaoyuke
Thank you for reviewing! https://codereview.chromium.org/2794723002/diff/80001/ios/web/navigation/crw_session_controller.mm File ios/web/navigation/crw_session_controller.mm (right): https://codereview.chromium.org/2794723002/diff/80001/ios/web/navigation/crw_session_controller.mm#newcode305 ios/web/navigation/crw_session_controller.mm:305: if (_navigationManager && _navigationManager->GetFacadeDelegate()) On ...
3 years, 8 months ago (2017-04-07 17:33:04 UTC) #16
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/2794723002/120001
3 years, 8 months ago (2017-04-07 18:19:28 UTC) #23
commit-bot: I haz the power
3 years, 8 months ago (2017-04-07 18:27:40 UTC) #26
Message was sent while issue was closed.
Committed patchset #6 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/fbb84a320edb0492eb645530d3b2...

Powered by Google App Engine
This is Rietveld 408576698