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

Issue 15041004: Replace PruneAllButActive with PruneAllButVisible. (Closed)

Created:
7 years, 7 months ago by Charlie Reis
Modified:
7 years, 6 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, cbentzel+watch_chromium.org, melevin+watch_chromium.org, tburkard+watch_chromium.org, dhollowa+watch_chromium.org, dougw+watch_chromium.org, jam, gideonwald, dominich, gavinp+prer_chromium.org, dominich+watch_chromium.org, David Black, Jered, samarth+watch_chromium.org, darin-cc_chromium.org, kmadhusu+watch_chromium.org
Visibility:
Public.

Description

Replace PruneAllButActive with PruneAllButVisible. Before we would forget the entry for the visible page, so we now require there to be a last committed entry, no transient entry, and optionally a new pending entry (not an existing pending entry). BUG=234809 TEST=Prerendering should not swap in without a last committed entry. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=203492

Patch Set 1 : Initial patch #

Patch Set 2 : Update tests, mark TODOs #

Total comments: 7

Patch Set 3 : Remove old invariant and add test for it. #

Total comments: 2

Patch Set 4 : Update comment #

Patch Set 5 : Add test for 234809 crash. #

Patch Set 6 : Rebase #

Total comments: 9

Patch Set 7 : CHECK rather than return false. #

Patch Set 8 : Rebase #

Patch Set 9 : Fix Instant local NTP case #

Patch Set 10 : Draft for prerender test. #

Total comments: 1

Patch Set 11 : Apply Chris's prerender fix. #

Total comments: 4

Patch Set 12 : Move protocol handler to IO thread. #

Patch Set 13 : Fix whitespace typo. #

Total comments: 6

Patch Set 14 : Fix style nits. #

Total comments: 2

Patch Set 15 : Change to CHECK. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+414 lines, -263 lines) Patch
M chrome/browser/prerender/prerender_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 chunks +71 lines, -14 lines 0 comments Download
M chrome/browser/prerender/prerender_manager.cc View 1 2 3 4 5 6 7 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_commands.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/browser_instant_controller.cc View 1 2 3 4 5 6 7 8 1 chunk +25 lines, -6 lines 0 comments Download
M chrome/browser/ui/search/instant_controller.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -1 line 0 comments Download
D chrome/test/data/prerender/prerender_visibility_quick.html View 1 1 chunk +0 lines, -48 lines 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/web_contents/navigation_controller_impl.h View 1 2 3 4 5 6 2 chunks +7 lines, -5 lines 0 comments Download
M content/browser/web_contents/navigation_controller_impl.cc View 1 2 3 4 5 6 7 5 chunks +49 lines, -72 lines 0 comments Download
M content/browser/web_contents/navigation_controller_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +211 lines, -85 lines 0 comments Download
M content/browser/web_contents/web_contents_impl_unittest.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -22 lines 0 comments Download
M content/public/browser/navigation_controller.h View 1 2 3 4 5 6 1 chunk +29 lines, -8 lines 0 comments Download

Messages

Total messages: 52 (0 generated)
Charlie Reis
Sreeram and Chris-- This is still failing some tests, and I'm wondering if I can ...
7 years, 7 months ago (2013-05-15 02:52:30 UTC) #1
sreeram
On 2013/05/15 02:52:30, creis wrote: > Sreeram: Instant appears to be trying to swap in ...
7 years, 7 months ago (2013-05-15 03:02:26 UTC) #2
cbentzel
mmenke may have the best idea for the test.
7 years, 7 months ago (2013-05-15 18:26:21 UTC) #3
mmenke
On 2013/05/15 18:26:21, cbentzel wrote: > mmenke may have the best idea for the test. ...
7 years, 7 months ago (2013-05-15 20:44:52 UTC) #4
cbentzel
Thanks for doing this, Charlie. https://codereview.chromium.org/15041004/diff/11001/chrome/browser/prerender/prerender_manager.cc File chrome/browser/prerender/prerender_manager.cc (right): https://codereview.chromium.org/15041004/diff/11001/chrome/browser/prerender/prerender_manager.cc#newcode435 chrome/browser/prerender/prerender_manager.cc:435: // entry, we might ...
7 years, 7 months ago (2013-05-17 00:32:14 UTC) #5
Charlie Reis
Thanks for the comments, and sorry for the delay! Crazy week. Responses inline. On 2013/05/15 ...
7 years, 7 months ago (2013-05-17 23:50:21 UTC) #6
sreeram
On Fri, May 17, 2013 at 4:50 PM, <creis@chromium.org> wrote: > Unfortunately, just being a ...
7 years, 7 months ago (2013-05-18 01:18:58 UTC) #7
Charlie Reis
On 2013/05/18 01:18:58, sreeram wrote: > On Fri, May 17, 2013 at 4:50 PM, <mailto:creis@chromium.org> ...
7 years, 7 months ago (2013-05-18 01:27:07 UTC) #8
sreeram
On Fri, May 17, 2013 at 6:27 PM, <creis@chromium.org> wrote: > Are you already doing ...
7 years, 7 months ago (2013-05-18 02:00:34 UTC) #9
cbentzel
https://codereview.chromium.org/15041004/diff/11001/chrome/browser/prerender/prerender_manager.cc File chrome/browser/prerender/prerender_manager.cc (right): https://codereview.chromium.org/15041004/diff/11001/chrome/browser/prerender/prerender_manager.cc#newcode435 chrome/browser/prerender/prerender_manager.cc:435: // entry, we might be able to transfer the ...
7 years, 7 months ago (2013-05-18 21:11:08 UTC) #10
Charlie Reis
Brett, while I work through the Instant and Prerendering questions and tests with Sreeram and ...
7 years, 7 months ago (2013-05-20 17:02:13 UTC) #11
brettw
https://codereview.chromium.org/15041004/diff/23001/content/public/browser/navigation_controller.h File content/public/browser/navigation_controller.h (right): https://codereview.chromium.org/15041004/diff/23001/content/public/browser/navigation_controller.h#newcode399 content/public/browser/navigation_controller.h:399: // Returns whether it is safe to call PruneAllButVisible ...
7 years, 7 months ago (2013-05-22 18:22:00 UTC) #12
Charlie Reis
https://codereview.chromium.org/15041004/diff/23001/content/public/browser/navigation_controller.h File content/public/browser/navigation_controller.h (right): https://codereview.chromium.org/15041004/diff/23001/content/public/browser/navigation_controller.h#newcode399 content/public/browser/navigation_controller.h:399: // Returns whether it is safe to call PruneAllButVisible ...
7 years, 7 months ago (2013-05-22 20:14:44 UTC) #13
Charlie Reis
Chris: I've added a NavigationController unit test to cover the original cause of the crash ...
7 years, 7 months ago (2013-05-23 19:12:11 UTC) #14
brettw
Thanks, comment is nice. lgtm
7 years, 7 months ago (2013-05-23 19:39:03 UTC) #15
cbentzel
On 2013/05/23 19:39:03, brettw wrote: > Thanks, comment is nice. lgtm Sorry, was away on ...
7 years, 6 months ago (2013-05-28 15:43:53 UTC) #16
cbentzel
https://codereview.chromium.org/15041004/diff/44001/chrome/browser/prerender/prerender_browsertest.cc File chrome/browser/prerender/prerender_browsertest.cc (right): https://codereview.chromium.org/15041004/diff/44001/chrome/browser/prerender/prerender_browsertest.cc#newcode1374 chrome/browser/prerender/prerender_browsertest.cc:1374: MessageLoop::current()->PostTask( I'm confused. I thought what this would test ...
7 years, 6 months ago (2013-05-28 18:39:16 UTC) #17
cbentzel
https://codereview.chromium.org/15041004/diff/44001/chrome/test/data/webui/net_internals/prerender_view.js File chrome/test/data/webui/net_internals/prerender_view.js (right): https://codereview.chromium.org/15041004/diff/44001/chrome/test/data/webui/net_internals/prerender_view.js#newcode101 chrome/test/data/webui/net_internals/prerender_view.js:101: this.navigate_(prerenderInfo); This is probably the location where we need ...
7 years, 6 months ago (2013-05-28 18:49:10 UTC) #18
mmenke
https://codereview.chromium.org/15041004/diff/44001/chrome/test/data/webui/net_internals/prerender_view.js File chrome/test/data/webui/net_internals/prerender_view.js (right): https://codereview.chromium.org/15041004/diff/44001/chrome/test/data/webui/net_internals/prerender_view.js#newcode101 chrome/test/data/webui/net_internals/prerender_view.js:101: this.navigate_(prerenderInfo); On 2013/05/28 18:49:11, cbentzel wrote: > This is ...
7 years, 6 months ago (2013-05-28 19:06:35 UTC) #19
mmenke
https://codereview.chromium.org/15041004/diff/44001/chrome/test/data/webui/net_internals/prerender_view.js File chrome/test/data/webui/net_internals/prerender_view.js (right): https://codereview.chromium.org/15041004/diff/44001/chrome/test/data/webui/net_internals/prerender_view.js#newcode101 chrome/test/data/webui/net_internals/prerender_view.js:101: this.navigate_(prerenderInfo); On 2013/05/28 19:06:36, mmenke wrote: > On 2013/05/28 ...
7 years, 6 months ago (2013-05-28 19:20:04 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/creis@chromium.org/15041004/44001
7 years, 6 months ago (2013-05-28 20:08:04 UTC) #21
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=5320
7 years, 6 months ago (2013-05-28 20:19:27 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/creis@chromium.org/15041004/44001
7 years, 6 months ago (2013-05-28 21:04:33 UTC) #23
Charlie Reis
On 2013/05/28 20:19:27, I haz the power (commit-bot) wrote: > Retried try job too often ...
7 years, 6 months ago (2013-05-28 21:05:24 UTC) #24
aarya
On 2013/05/28 21:05:24, creis wrote: > On 2013/05/28 20:19:27, I haz the power (commit-bot) wrote: ...
7 years, 6 months ago (2013-05-28 21:07:28 UTC) #25
Charlie Reis
Thanks for your attention on this, Chris and Matt! A few follow-up questions below, and ...
7 years, 6 months ago (2013-05-28 23:21:59 UTC) #26
mmenke
https://chromiumcodereview.appspot.com/15041004/diff/44001/chrome/test/data/webui/net_internals/prerender_view.js File chrome/test/data/webui/net_internals/prerender_view.js (right): https://chromiumcodereview.appspot.com/15041004/diff/44001/chrome/test/data/webui/net_internals/prerender_view.js#newcode101 chrome/test/data/webui/net_internals/prerender_view.js:101: this.navigate_(prerenderInfo); On 2013/05/28 23:22:00, creis wrote: > On 2013/05/28 ...
7 years, 6 months ago (2013-05-28 23:38:19 UTC) #27
cbentzel
For the Prerender test - what we want to do is a) Navigate to a ...
7 years, 6 months ago (2013-05-29 19:02:01 UTC) #28
mmenke
On 2013/05/29 19:02:01, cbentzel wrote: > For the Prerender test - what we want to ...
7 years, 6 months ago (2013-05-29 19:05:34 UTC) #29
Charlie Reis
I've updated the Instant changes with Sreeram's suggestion, so we pass the Instant tests now. ...
7 years, 6 months ago (2013-05-29 22:30:51 UTC) #30
mmenke
On 2013/05/29 22:30:51, creis wrote: > I've updated the Instant changes with Sreeram's suggestion, so ...
7 years, 6 months ago (2013-05-30 16:13:52 UTC) #31
Charlie Reis
On 2013/05/30 16:13:52, mmenke wrote: > I'll get back to you later this afternoon. Have ...
7 years, 6 months ago (2013-05-30 16:30:25 UTC) #32
cbentzel
Here's the diff you should apply: diff --git a/chrome/browser/prerender/prerender_browsertest.cc b/chrome/browser/prerender/prerender_browsertest.cc index 97702af..0e57bc2 100644 --- a/chrome/browser/prerender/prerender_browsertest.cc ...
7 years, 6 months ago (2013-05-30 19:54:19 UTC) #33
Charlie Reis
Thanks guys! This should be ready for a final review from Sreeram and Chris now. ...
7 years, 6 months ago (2013-05-30 20:20:58 UTC) #34
mmenke
https://codereview.chromium.org/15041004/diff/106001/chrome/browser/prerender/prerender_browsertest.cc File chrome/browser/prerender/prerender_browsertest.cc (right): https://codereview.chromium.org/15041004/diff/106001/chrome/browser/prerender/prerender_browsertest.cc#newcode1408 chrome/browser/prerender/prerender_browsertest.cc:1408: no_commit_url, never_respond_handler.Pass()); This should be done on the IO ...
7 years, 6 months ago (2013-05-30 20:24:07 UTC) #35
cbentzel
https://codereview.chromium.org/15041004/diff/106001/chrome/browser/prerender/prerender_browsertest.cc File chrome/browser/prerender/prerender_browsertest.cc (right): https://codereview.chromium.org/15041004/diff/106001/chrome/browser/prerender/prerender_browsertest.cc#newcode1408 chrome/browser/prerender/prerender_browsertest.cc:1408: no_commit_url, never_respond_handler.Pass()); On 2013/05/30 20:24:08, mmenke wrote: > This ...
7 years, 6 months ago (2013-05-30 20:30:29 UTC) #36
mmenke
https://codereview.chromium.org/15041004/diff/106001/chrome/browser/prerender/prerender_browsertest.cc File chrome/browser/prerender/prerender_browsertest.cc (right): https://codereview.chromium.org/15041004/diff/106001/chrome/browser/prerender/prerender_browsertest.cc#newcode1408 chrome/browser/prerender/prerender_browsertest.cc:1408: no_commit_url, never_respond_handler.Pass()); On 2013/05/30 20:30:30, cbentzel wrote: > On ...
7 years, 6 months ago (2013-05-30 20:33:15 UTC) #37
cbentzel
crbug.com/245413 On Thu, May 30, 2013 at 4:33 PM, <mmenke@chromium.org> wrote: > > https://codereview.chromium.org/15041004/diff/106001/chrome/browser/prerender/prerender_browsertest.cc > ...
7 years, 6 months ago (2013-05-30 20:35:37 UTC) #38
sreeram
instant pieces LGTM
7 years, 6 months ago (2013-05-30 22:31:45 UTC) #39
Charlie Reis
https://codereview.chromium.org/15041004/diff/106001/chrome/browser/prerender/prerender_browsertest.cc File chrome/browser/prerender/prerender_browsertest.cc (right): https://codereview.chromium.org/15041004/diff/106001/chrome/browser/prerender/prerender_browsertest.cc#newcode1408 chrome/browser/prerender/prerender_browsertest.cc:1408: no_commit_url, never_respond_handler.Pass()); On 2013/05/30 20:33:16, mmenke wrote: > On ...
7 years, 6 months ago (2013-05-30 23:09:58 UTC) #40
Charlie Reis
tedchoc: Can you take a look at content_view_core_impl.cc? It's possible the PruneAllButVisible call will fail ...
7 years, 6 months ago (2013-05-30 23:13:16 UTC) #41
cbentzel
prerender LGTM - as do the core NavigationController changes. Thanks!
7 years, 6 months ago (2013-05-31 01:54:52 UTC) #42
Ted C
lgtm for content_view_core Will investigate if we need to handle the failure case.
7 years, 6 months ago (2013-05-31 05:32:10 UTC) #43
Charlie Reis
Scott, can you look at chrome/browser/ui/browser_commands.cc for owners approval?
7 years, 6 months ago (2013-05-31 15:01:33 UTC) #44
sky
LGTM
7 years, 6 months ago (2013-05-31 17:02:44 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/creis@chromium.org/15041004/117001
7 years, 6 months ago (2013-05-31 18:19:21 UTC) #46
mmenke
A couple last-minute nits. https://codereview.chromium.org/15041004/diff/117001/chrome/browser/prerender/prerender_browsertest.cc File chrome/browser/prerender/prerender_browsertest.cc (right): https://codereview.chromium.org/15041004/diff/117001/chrome/browser/prerender/prerender_browsertest.cc#newcode588 chrome/browser/prerender/prerender_browsertest.cc:588: net::NetworkDelegate* network_delegate) : nit: Colon ...
7 years, 6 months ago (2013-05-31 18:20:18 UTC) #47
Charlie Reis
mmenke: Good catch, updated. PTAL. https://codereview.chromium.org/15041004/diff/117001/chrome/browser/prerender/prerender_browsertest.cc File chrome/browser/prerender/prerender_browsertest.cc (right): https://codereview.chromium.org/15041004/diff/117001/chrome/browser/prerender/prerender_browsertest.cc#newcode588 chrome/browser/prerender/prerender_browsertest.cc:588: net::NetworkDelegate* network_delegate) : On ...
7 years, 6 months ago (2013-05-31 18:27:54 UTC) #48
mmenke
LGTM, thanks! https://codereview.chromium.org/15041004/diff/125001/chrome/browser/prerender/prerender_browsertest.cc File chrome/browser/prerender/prerender_browsertest.cc (right): https://codereview.chromium.org/15041004/diff/125001/chrome/browser/prerender/prerender_browsertest.cc#newcode612 chrome/browser/prerender/prerender_browsertest.cc:612: DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); Since this is in a test, ...
7 years, 6 months ago (2013-05-31 18:31:40 UTC) #49
Charlie Reis
https://codereview.chromium.org/15041004/diff/125001/chrome/browser/prerender/prerender_browsertest.cc File chrome/browser/prerender/prerender_browsertest.cc (right): https://codereview.chromium.org/15041004/diff/125001/chrome/browser/prerender/prerender_browsertest.cc#newcode612 chrome/browser/prerender/prerender_browsertest.cc:612: DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); On 2013/05/31 18:31:41, mmenke wrote: > Since this ...
7 years, 6 months ago (2013-05-31 18:34:28 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/creis@chromium.org/15041004/127001
7 years, 6 months ago (2013-05-31 18:34:52 UTC) #51
commit-bot: I haz the power
7 years, 6 months ago (2013-05-31 22:31:18 UTC) #52
Message was sent while issue was closed.
Change committed as 203492

Powered by Google App Engine
This is Rietveld 408576698