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

Issue 14043009: Fall back to local page if online NTP fails to load. (Closed)

Created:
7 years, 8 months ago by David Black
Modified:
7 years, 7 months ago
Reviewers:
samarth, sreeram, Jered
CC:
chromium-reviews, melevin, dhollowa+watch_chromium.org, dougw+watch_chromium.org, sreeram, gideonwald, dominich, samarth+watch_chromium.org, kmadhusu+watch_chromium.org, Jered
Visibility:
Public.

Description

If the online search provider page fails to load (404 or other error code) then we fall back to the local fallback page. Also falls back if the user switches away from a tab before it's done loading, to prevent Ctrl-TTTTTTTTTT from completely bogging down the network. BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=198376

Patch Set 1 #

Patch Set 2 : DEBUG- upload a set with lots of misc logging statements. Not intended for review. #

Patch Set 3 : More debug stuff #

Patch Set 4 : Work in progress... #

Patch Set 5 : Cleanup #

Total comments: 16

Patch Set 6 : Address some comments #

Patch Set 7 : Remove todo #

Patch Set 8 : Remove logic to always try to load a server-provided NTP on frontmost tab. #

Total comments: 20

Patch Set 9 : Init Instant tab differently #

Patch Set 10 : Fix memory issues and make sure we preload everything #

Patch Set 11 : remove search_tab_helper changes #

Total comments: 6

Patch Set 12 : Address some comments #

Patch Set 13 : Rebase & add flag guard #

Patch Set 14 : Fix terrible flag guarding logic #

Total comments: 16

Patch Set 15 : Addressing comments, added unittest, interactive_ui_test in progress #

Patch Set 16 : Added interactive_uitest #

Patch Set 17 : Switch to matchesOriginAndPath #

Patch Set 18 : Fix failing tests #

Total comments: 40

Patch Set 19 : Actually address comments #

Patch Set 20 : Address sreeram's comments #

Patch Set 21 : Add some checks for extended_enabled_ to not break old Chrome Instant #

Total comments: 9

Patch Set 22 : Fix failing unittest & address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+242 lines, -38 lines) Patch
M chrome/app/generated_resources.grd View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/search/search.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/search/instant_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/search/instant_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 7 chunks +102 lines, -29 lines 0 comments Download
M chrome/browser/ui/search/instant_extended_interactive_uitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 5 chunks +59 lines, -6 lines 0 comments Download
M chrome/browser/ui/search/instant_page.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +15 lines, -0 lines 0 comments Download
M chrome/browser/ui/search/instant_page.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +23 lines, -0 lines 0 comments Download
M chrome/browser/ui/search/instant_tab.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/search/instant_tab.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +7 lines, -1 line 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
David Black
First pass, no tests yet. Please patch in and bang on and tell me what ...
7 years, 8 months ago (2013-04-26 01:38:32 UTC) #1
sreeram
On 2013/04/26 01:38:32, David Black wrote: > First pass, no tests yet. Please patch in ...
7 years, 8 months ago (2013-04-26 04:27:15 UTC) #2
dcblack
1) feature! 2&3) I'm going to bang on these cases today to see what happens. ...
7 years, 7 months ago (2013-04-26 17:23:05 UTC) #3
David Black
Update: After much (much!) poking around, I have come to the conclusion that it's impossible ...
7 years, 7 months ago (2013-04-27 02:59:15 UTC) #4
sreeram
On 2013/04/27 02:59:15, David Black wrote: > Update: After much (much!) poking around, I have ...
7 years, 7 months ago (2013-04-27 03:16:20 UTC) #5
David Black
On 2013/04/27 03:16:20, sreeram wrote: > On 2013/04/27 02:59:15, David Black wrote: > > Update: ...
7 years, 7 months ago (2013-04-27 05:20:58 UTC) #6
samarth
On 2013/04/27 05:20:58, David Black wrote: > On 2013/04/27 03:16:20, sreeram wrote: > > On ...
7 years, 7 months ago (2013-04-29 18:16:02 UTC) #7
David Black
Ok, complete reconceptualization and rewrite of this code. PTAL. Seems to work pretty well now. ...
7 years, 7 months ago (2013-04-30 07:40:37 UTC) #8
samarth
I need to take a more careful look, but an initial set of comments from ...
7 years, 7 months ago (2013-04-30 17:10:33 UTC) #9
David Black
Flag guarding coming soon. https://codereview.chromium.org/14043009/diff/18001/chrome/browser/search/search.cc File chrome/browser/search/search.cc (right): https://codereview.chromium.org/14043009/diff/18001/chrome/browser/search/search.cc#newcode163 chrome/browser/search/search.cc:163: return true; On 2013/04/30 17:10:33, ...
7 years, 7 months ago (2013-04-30 23:09:08 UTC) #10
David Black
Updated to remove the logic to attempt to show a server-provided NTP on subsequent tab ...
7 years, 7 months ago (2013-05-01 00:52:07 UTC) #11
samarth
https://codereview.chromium.org/14043009/diff/18001/chrome/browser/search/search.cc File chrome/browser/search/search.cc (right): https://codereview.chromium.org/14043009/diff/18001/chrome/browser/search/search.cc#newcode163 chrome/browser/search/search.cc:163: return true; On 2013/04/30 23:09:08, David Black wrote: > ...
7 years, 7 months ago (2013-05-01 06:26:47 UTC) #12
David Black
Writing a test for this is proving somewhat difficult. It's in progress. Rest of the ...
7 years, 7 months ago (2013-05-02 00:49:45 UTC) #13
samarth
This is looking pretty good from my perspective (as long as we have a flag ...
7 years, 7 months ago (2013-05-02 03:12:55 UTC) #14
David Black
https://codereview.chromium.org/14043009/diff/30001/chrome/browser/ui/search/instant_tab.cc File chrome/browser/ui/search/instant_tab.cc (right): https://codereview.chromium.org/14043009/diff/30001/chrome/browser/ui/search/instant_tab.cc#newcode17 chrome/browser/ui/search/instant_tab.cc:17: if (!contents->IsLoading()) On 2013/05/02 03:12:56, samarth wrote: > On ...
7 years, 7 months ago (2013-05-02 05:02:49 UTC) #15
samarth
FYI, this crashes in a debug build right now.
7 years, 7 months ago (2013-05-02 17:07:08 UTC) #16
samarth
One case where the redirect doesn't work: $ out/Release/chrome --user-data-dir=/tmp/udd-cros-new --force-compositing-mode --remote-debugging-port=9222 --vmodule=*searchbox*=1,*instant_*=1 --force-fieldtrials='InstantExtended/Group1 espv:2 ...
7 years, 7 months ago (2013-05-02 21:57:18 UTC) #17
David Black
> --host-resolver-rules="MAP * ~NOTFOUND" Is this a real thing? Are you sure this doesn't also ...
7 years, 7 months ago (2013-05-02 23:30:00 UTC) #18
David Black
> --host-resolver-rules="MAP * ~NOTFOUND" This works fine for me now. Test added, other tests fixed, ...
7 years, 7 months ago (2013-05-03 02:15:33 UTC) #19
samarth
lgtm Nice work! Just nits below. I'm happy that the scary bits are behind a ...
7 years, 7 months ago (2013-05-03 04:39:17 UTC) #20
samarth
https://codereview.chromium.org/14043009/diff/67001/chrome/browser/ui/search/instant_controller.cc File chrome/browser/ui/search/instant_controller.cc (right): https://codereview.chromium.org/14043009/diff/67001/chrome/browser/ui/search/instant_controller.cc#newcode1751 chrome/browser/ui/search/instant_controller.cc:1751: void InstantController::RedirectToLocalNTP(content::WebContents* contents) { Oh also, can you add ...
7 years, 7 months ago (2013-05-03 05:23:11 UTC) #21
David Black
https://codereview.chromium.org/14043009/diff/67001/chrome/browser/ui/search/instant_controller.cc File chrome/browser/ui/search/instant_controller.cc (right): https://codereview.chromium.org/14043009/diff/67001/chrome/browser/ui/search/instant_controller.cc#newcode704 chrome/browser/ui/search/instant_controller.cc:704: if (IsContentsFrom(ntp(), contents)) { On 2013/05/03 04:39:17, samarth wrote: ...
7 years, 7 months ago (2013-05-03 06:14:44 UTC) #22
sreeram
Still reviewing... some initial comments. https://codereview.chromium.org/14043009/diff/67001/chrome/browser/search/search.cc File chrome/browser/search/search.cc (right): https://codereview.chromium.org/14043009/diff/67001/chrome/browser/search/search.cc#newcode163 chrome/browser/search/search.cc:163: return true; This bypasses ...
7 years, 7 months ago (2013-05-03 23:17:31 UTC) #23
David Black
Forgot to git cl upload the stuff from Samarth's comments - sorry about that. https://codereview.chromium.org/14043009/diff/67001/chrome/browser/search/search.cc ...
7 years, 7 months ago (2013-05-04 00:49:23 UTC) #24
David Black
https://codereview.chromium.org/14043009/diff/67001/chrome/browser/ui/search/instant_page.cc File chrome/browser/ui/search/instant_page.cc (right): https://codereview.chromium.org/14043009/diff/67001/chrome/browser/ui/search/instant_page.cc#newcode281 chrome/browser/ui/search/instant_page.cc:281: delegate_->InstantPageLoadFailed(contents()); On 2013/05/04 00:49:23, David Black wrote: > On ...
7 years, 7 months ago (2013-05-04 00:53:51 UTC) #25
sreeram
LGTM My main concern is the nav stack busting thing mentioned below. However, it's tricky ...
7 years, 7 months ago (2013-05-05 08:40:39 UTC) #26
Jered
FYI https://codereview.chromium.org/14043009/diff/87002/chrome/browser/ui/search/instant_controller.cc File chrome/browser/ui/search/instant_controller.cc (right): https://codereview.chromium.org/14043009/diff/87002/chrome/browser/ui/search/instant_controller.cc#newcode736 chrome/browser/ui/search/instant_controller.cc:736: LOG_INSTANT_DEBUG_EVENT(this, "InstantPageLoadFailed: instant_tab"); So when do we get ...
7 years, 7 months ago (2013-05-05 15:08:00 UTC) #27
sreeram
https://codereview.chromium.org/14043009/diff/87002/chrome/browser/ui/search/instant_controller.cc File chrome/browser/ui/search/instant_controller.cc (right): https://codereview.chromium.org/14043009/diff/87002/chrome/browser/ui/search/instant_controller.cc#newcode736 chrome/browser/ui/search/instant_controller.cc:736: LOG_INSTANT_DEBUG_EVENT(this, "InstantPageLoadFailed: instant_tab"); On 2013/05/05 15:08:00, Jered wrote: > ...
7 years, 7 months ago (2013-05-05 16:38:13 UTC) #28
Jered
https://codereview.chromium.org/14043009/diff/87002/chrome/browser/ui/search/instant_controller.cc File chrome/browser/ui/search/instant_controller.cc (right): https://codereview.chromium.org/14043009/diff/87002/chrome/browser/ui/search/instant_controller.cc#newcode736 chrome/browser/ui/search/instant_controller.cc:736: LOG_INSTANT_DEBUG_EVENT(this, "InstantPageLoadFailed: instant_tab"); On 2013/05/05 16:38:13, sreeram wrote: > ...
7 years, 7 months ago (2013-05-05 16:59:13 UTC) #29
David Black
https://codereview.chromium.org/14043009/diff/87002/chrome/browser/ui/search/instant_controller.cc File chrome/browser/ui/search/instant_controller.cc (right): https://codereview.chromium.org/14043009/diff/87002/chrome/browser/ui/search/instant_controller.cc#newcode731 chrome/browser/ui/search/instant_controller.cc:731: const GURL current_url = contents->GetURL(); On 2013/05/05 08:40:39, sreeram ...
7 years, 7 months ago (2013-05-05 20:02:42 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dcblack@chromium.org/14043009/98001
7 years, 7 months ago (2013-05-05 22:21:24 UTC) #31
commit-bot: I haz the power
7 years, 7 months ago (2013-05-06 05:26:03 UTC) #32
Message was sent while issue was closed.
Change committed as 198376

Powered by Google App Engine
This is Rietveld 408576698