summaryrefslogtreecommitdiffstats
path: root/chrome/browser/prerender/prerender_manager.cc
Commit message (Collapse)AuthorAgeFilesLines
* Added multiple NetworkActionPredictor heuristics and a field trial to select ↵dominich@chromium.org2011-09-271-1/+21
| | | | | | | | | | | | between them. BUG= TEST=NetworkActionPredictor* Review URL: http://codereview.chromium.org/8036003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103036 0039d316-1c4b-4281-b951-d872f2087c98
* Deflake PrerenderInfiniteLoopMultiple. Issue is that link tagsmmenke@chromium.org2011-09-261-81/+20
| | | | | | | | | | | | | | are not necessarily handled before DidStopLoading() is called. Also move pending prerender tracking from the PrerenderManager to the PrerenderContents in the process. BUG=77323 TEST=PrerenderBrowserTest.PrerenderInfiniteLoopMultiple Review URL: http://codereview.chromium.org/7978031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102745 0039d316-1c4b-4281-b951-d872f2087c98
* Add Field Trial for Prerender From Omnibox.dominich@chromium.org2011-09-201-4/+4
| | | | | | | | | | BUG=95066 TEST=None Review URL: http://codereview.chromium.org/7825009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101963 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 100003 - Moved PrerenderManager to ProfileKeyedService system.dominich@chromium.org2011-09-071-14/+5
| | | | | | | | | | | | | | | As per https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/554b5b0ca05e001d# it is recommended that weak references to services be removed from Profiles and constructed as ProfileKeyedServices instead. This does this for the PrerenderManager. BUG=94643 TEST=Prerender* Review URL: http://codereview.chromium.org/7795009 TBR=dominich@chromium.org Review URL: http://codereview.chromium.org/7837045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100014 0039d316-1c4b-4281-b951-d872f2087c98
* Moved PrerenderManager to ProfileKeyedService system.dominich@chromium.org2011-09-071-5/+14
| | | | | | | | | | | | As per https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/554b5b0ca05e001d# it is recommended that weak references to services be removed from Profiles and constructed as ProfileKeyedServices instead. This does this for the PrerenderManager. BUG=94643 TEST=Prerender* Review URL: http://codereview.chromium.org/7795009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100003 0039d316-1c4b-4281-b951-d872f2087c98
* B0;136;0cRe-enable TopSites in PrerenderManager, this time duplicating the ↵tburkard@chromium.org2011-09-061-16/+4
| | | | | | | | | | invariant observed in NTP (browser must have started). R=sky, cbentzel Review URL: http://codereview.chromium.org/7828023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99741 0039d316-1c4b-4281-b951-d872f2087c98
* Nukes remove_first_entry from CopyStateFromAndPrune. This turned out bad for ↵sky@chromium.org2011-09-031-2/+1
| | | | | | | | | | | | | | | | | | | | | two reasons: . Doing this results in the browser thinking the current page is the last page the user was on. For example, if you start on the new tab page do an instant search and press enter before the page pushes a navigation then the browser shows chrome://newtab until a navigation is pushed. . If a message is in flight from the renderer at the time this happens NavigationController can't locate a NavigationEntry, thinks the renderer is spamming it and kills the page. BUG=95228 TEST=see bug R=cbentzel@chromium.org Review URL: http://codereview.chromium.org/7828051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99574 0039d316-1c4b-4281-b951-d872f2087c98
* Update base/timer.h code to pass through Location from call sites. (reland) ↵jbates@chromium.org2011-09-021-2/+2
| | | | | | | | original CL w/LGTMs: http://codereview.chromium.org/7812036/ Review URL: http://codereview.chromium.org/7824041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99409 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Currently, base/timer.cc calls PostTask with FROM_HERE as the Location,mattm@chromium.org2011-09-021-2/+2
| | | | | | | | | | | | so the original code that created the delayed callback is lost." This reverts commit 4cf5cf73d319b69c32ad30af8954235755856455. (r99284) TBR=jbates@chromium.org Review URL: http://codereview.chromium.org/7825026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99290 0039d316-1c4b-4281-b951-d872f2087c98
* Currently, base/timer.cc calls PostTask with FROM_HERE as the Location, so ↵jbates@chromium.org2011-09-021-2/+2
| | | | | | | | | | the original code that created the delayed callback is lost. This change adds a tracked_objects::Location parameter to the APIs in base/timer.h so we can trace the PostTask callbacks. The other files are touched to add the FROM_HERE Location parameter. Review URL: http://codereview.chromium.org/7812036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99284 0039d316-1c4b-4281-b951-d872f2087c98
* Disable creation of the class using TopSites to collect navigation statstburkard@chromium.org2011-09-011-4/+2
| | | | | | | | | to fix a crasher. BUG=94807 R=sky,cbentzel Review URL: http://codereview.chromium.org/7830010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99231 0039d316-1c4b-4281-b951-d872f2087c98
* TabContentsWrapper cleanup.avi@chromium.org2011-08-311-5/+5
| | | | | | | | | BUG=94811 TEST=no visible change Review URL: http://codereview.chromium.org/7810006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99014 0039d316-1c4b-4281-b951-d872f2087c98
* Tighten conditions for when a URL is a search result, and movetburkard@chromium.org2011-08-301-5/+1
| | | | | | | | it to a different class. R=ziga, dominich Review URL: http://codereview.chromium.org/7812011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98895 0039d316-1c4b-4281-b951-d872f2087c98
* Do not count image search results towards the GWS metric.tburkard@chromium.org2011-08-301-1/+2
| | | | | | | R=dominich@chromium.org, cbentzel@chromium.org Review URL: http://codereview.chromium.org/7800010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98812 0039d316-1c4b-4281-b951-d872f2087c98
* Add code to keep track of what fraction of pageviews are top sites.tburkard@chromium.org2011-08-291-1/+80
| | | | | | | This code will be removed again once histograms have been collected. Review URL: http://codereview.chromium.org/7775003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98734 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 98250 - Add code to keep track of what fraction of pageviews are top ↵jbates@chromium.org2011-08-251-64/+1
| | | | | | | | | | | | | | sites. This code will be removed again once histograms have been collected (prior to the M15 branchpoint). R=cbentzel@chromium.org, dominich@chromium.org Review URL: http://codereview.chromium.org/7741002 TBR=tburkard@chromium.org Review URL: http://codereview.chromium.org/7740029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98270 0039d316-1c4b-4281-b951-d872f2087c98
* Add code to keep track of what fraction of pageviews are top sites.tburkard@chromium.org2011-08-251-1/+64
| | | | | | | | | This code will be removed again once histograms have been collected (prior to the M15 branchpoint). R=cbentzel@chromium.org, dominich@chromium.org Review URL: http://codereview.chromium.org/7741002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98250 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 98131 - Add code to keep track of what fraction of pageviews are top ↵tburkard@chromium.org2011-08-241-59/+1
| | | | | | | | | | | | | | sites. This code will be removed again once histograms have been collected (prior to the M15 branchpoint). R=cbentzel@chromium.org, dominich@chromium.org Review URL: http://codereview.chromium.org/7728004 TBR=tburkard@chromium.org Review URL: http://codereview.chromium.org/7748001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98135 0039d316-1c4b-4281-b951-d872f2087c98
* Add code to keep track of what fraction of pageviews are top sites.tburkard@chromium.org2011-08-241-1/+59
| | | | | | | | | This code will be removed again once histograms have been collected (prior to the M15 branchpoint). R=cbentzel@chromium.org, dominich@chromium.org Review URL: http://codereview.chromium.org/7728004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98131 0039d316-1c4b-4281-b951-d872f2087c98
* Prefix all IPC messages used by src\chrome with Chrome. For e.g ↵ananta@chromium.org2011-08-191-1/+2
| | | | | | | | | | | | | | | ChromeViewMsg_, ChromeViewHostMsg, etc. This makes it easier to identify which messages are specific to content and chrome. This is a preparation CL for bug http://code.google.com/p/chromium/issues/detail?id=87335 which requires IPC's to not span across content and chrome. When IPC's cross these boundaries they need to be handled as API calls. BUG=87335 Review URL: http://codereview.chromium.org/7631063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97536 0039d316-1c4b-4281-b951-d872f2087c98
* Noting prerender as inactive when in control group.dominich@chromium.org2011-08-181-4/+6
| | | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/7669021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97267 0039d316-1c4b-4281-b951-d872f2087c98
* A number of issues weren't addressed with the earlier patch for prerender + ↵cbentzel@chromium.org2011-08-141-0/+8
| | | | | | | | | | | | | | | | | | | | browsing history, particularly for instant pages. - The "remove first entry" option used by instant was not being handled correctly when there was only one committed entry in the NavigationController. - Renderer-issued navigations which were committed in the browser but not yet known by the browser/NavigationController were being incorrectly pruned. This did not happen regularly in the prerender case, but does in the instant case, particularly when changing what's typed in the omnibox. - Some additional sanity testing to make sure that the message is sent to the correct render process. - Additional unit tests are added. BUG=89798 TEST=NavigationControllerTest.CopyStateFromAndPrune*, RenderViewTest.SetHistoryLengthAndPrune. Review URL: http://codereview.chromium.org/7618016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96724 0039d316-1c4b-4281-b951-d872f2087c98
* Move prerender histograms out of prerender manager.tburkard@chromium.org2011-08-101-181/+22
| | | | | | | | Add a separate histogram label for GWS based prerendering. R=cbentzel@chromium.org, dominich@chromium.org Review URL: http://codereview.chromium.org/7605020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96227 0039d316-1c4b-4281-b951-d872f2087c98
* Fix prerenders in the delete list not being returned bymmenke@chromium.org2011-08-061-1/+1
| | | | | | | | | | | | | | PrerenderManager::GetAsValue(). NetInternalsTest.NetInternalsPrerenderView expects to always see the prerender as active or in the history, once started. BUG=91799 TEST=NetInternalsTest.NetInternalsPrerenderView (Currently flaky) Review URL: http://codereview.chromium.org/7550031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95721 0039d316-1c4b-4281-b951-d872f2087c98
* Removal of Profile from content part 3.avi@chromium.org2011-07-281-2/+3
| | | | | | | | | BUG=76788 TEST=no change visible Review URL: http://codereview.chromium.org/7522018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94511 0039d316-1c4b-4281-b951-d872f2087c98
* Add prerender to ChromeOS.cbentzel@chromium.org2011-07-281-1/+18
| | | | | | | | | | | | This enables prerender whenever the active network is ethernet or wifi. BUG=89966 TEST=Tested manually. Review URL: http://codereview.chromium.org/7517016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94463 0039d316-1c4b-4281-b951-d872f2087c98
* Adding API to cancel all prerenders.dominich@chromium.org2011-07-201-0/+11
| | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7450001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93193 0039d316-1c4b-4281-b951-d872f2087c98
* Updating histograms to allow for experiments & log origin-based histograms.tburkard@chromium.org2011-07-071-52/+154
| | | | | | | R=cbentzel@chromium.org, dominich@chromium.org Review URL: http://codereview.chromium.org/7289020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91765 0039d316-1c4b-4281-b951-d872f2087c98
* Removes pure virtual methods from TabContentsDelegate and removes allsky@chromium.org2011-07-011-13/+0
| | | | | | | | | | | | empty implementations. BUG=none TEST=none R=brettw@chromium.org Review URL: http://codereview.chromium.org/7302001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91344 0039d316-1c4b-4281-b951-d872f2087c98
* Move some prerender configuration settings out of PrerenderManager.cbentzel@chromium.org2011-06-301-51/+5
| | | | | | | | | | BUG=None TEST=Existing Tests. Review URL: http://codereview.chromium.org/7248062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91159 0039d316-1c4b-4281-b951-d872f2087c98
* PrerenderManager public API cleanup.dominich@chromium.org2011-06-281-100/+71
| | | | | | | | | | BUG= TEST=Prerender* Review URL: http://codereview.chromium.org/7272011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90815 0039d316-1c4b-4281-b951-d872f2087c98
* Adding Origin to net-internals#prerender and fix a page ID conflict.dominich@chromium.org2011-06-281-0/+1
| | | | | | | | | | BUG=87124 TEST=PrerenderHistoryTest.GetAsValue Review URL: http://codereview.chromium.org/7253009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90700 0039d316-1c4b-4281-b951-d872f2087c98
* Removal of POST as invalid http methoddominich@chromium.org2011-06-271-1/+2
| | | | | | | | | | BUG=87286 TEST=PrerenderBrowserTest.PrerenderXhrPost Review URL: http://codereview.chromium.org/7271001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90603 0039d316-1c4b-4281-b951-d872f2087c98
* Added prerendering to omnibox. Enable through --prerender-from-omnibox ↵dominich@chromium.org2011-06-241-22/+45
| | | | | | | | | | | | command-line-flag or through the about:flag with the same name. Only effective if prerender is enabled and instant is disabled or restricted to search. BUG=87124 TEST=none Review URL: http://codereview.chromium.org/7210020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90384 0039d316-1c4b-4281-b951-d872f2087c98
* Fix up prerendering net-internals page and add some data:mmenke@chromium.org2011-06-211-1/+3
| | | | | | | | | | | | Fix memory leak, fix CSS. Add whether or not prerendering is enabled, add time. BUG=none TEST=PrerenderHistoryTest.GetAsValue Review URL: http://codereview.chromium.org/7201009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89840 0039d316-1c4b-4281-b951-d872f2087c98
* Clear prerender history on clear history.mmenke@chromium.org2011-06-201-7/+22
| | | | | | | | | | | Also cancel active prerenders on clear history or cache. BUG=none TEST=PrerenderManagerTest.ClearTest, PrerenderHistoryTest.GetAsValue, PrerenderBrowserTest.PrerenderClearHistory, PrerenderBrowserTest.PrerenderClearCache Review URL: http://codereview.chromium.org/7205007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89729 0039d316-1c4b-4281-b951-d872f2087c98
* Prerender tab for net-internalscbentzel@chromium.org2011-06-151-1/+39
| | | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/7143001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89235 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash when swapping in a prerendered page for a page which has an unload ↵cbentzel@chromium.org2011-06-091-0/+1
| | | | | | | | | | | | | | | | | | | handler. *** Note: this is the fix without a browser test, for expediency. A CL with the test is in http://codereview.chromium.org/7046053/ *** The root cause PrerenderManager::OnCloseTabContentsDeleter was never unregistering itself as a TabContentsDelegate in CloseContents. r87606 exposed this by changing the TabContents destructor to deference the delegate if it's non-NULL. BUG=85350 TEST=None Review URL: http://codereview.chromium.org/7108032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88478 0039d316-1c4b-4281-b951-d872f2087c98
* Keep around old tab contents until their unload handlers are done.sreeram@chromium.org2011-05-311-4/+64
| | | | | | | | | | | | Delete the old tab contents only after its CloseContents() has been called. BUG=none TEST=View a page with an unload handler. Cause a prerendered page to be swapped into it. Observe that the unload handler runs fully (e.g.: via a network trace). Review URL: http://codereview.chromium.org/7063025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87271 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce likelihood of double-get of top-level prerendered resource.cbentzel@chromium.org2011-05-301-0/+12
| | | | | | | | | | | | | | | | | | | | | | | When a link to a prerendered page is clicked, a DidStartProvisionalLoadForFrame is sent, as well as a RequestResource IPC for the top-level page, both from the referring page. The RequestResource caused an additional GET of the top-level page, which is frequently uncacheable. To prevent this from happening, RequestResource's which _might_ match a prerendered page URL are deferred. On the UI thread, the child_id and route_id of the request are checked against active RenderViewHost's. If there is no longer an active RenderViewHost (which would happen if the prerendered page is swapped in), the request is cancelled. Otherwise, it is resumed. BUG=71089 TEST=Existing browser_tests, unit_tests --gtest_filter=*PrerenderTrackerUrls*, click on a link that is being prerendered and make sure that a request is not sent over the wire. Review URL: http://codereview.chromium.org/7074001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87258 0039d316-1c4b-4281-b951-d872f2087c98
* Remove old Prerender interface and mark unreachable methods as NOTREACHED()dominich@chromium.org2011-05-271-105/+0
| | | | | | | | | | BUG=none TEST=PrerenderBrowserTest* Review URL: http://codereview.chromium.org/7068026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87030 0039d316-1c4b-4281-b951-d872f2087c98
* Determine whether or not a prerender tag comes from ammenke@chromium.org2011-05-271-26/+13
| | | | | | | | | | | | currently prerendering RenderView on the UI thread, rather than the IO thread. BUG=none TEST=PrerenderBrowserTest.PrerenderInfiniteLoop (Currently FLAKY). Review URL: http://codereview.chromium.org/7077009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86968 0039d316-1c4b-4281-b951-d872f2087c98
* Fix fragment handling in Prerender to cancel on a fragment mismatch.dominich@chromium.org2011-05-261-2/+12
| | | | | | | | | | | | Also added a final status to capture these instances, and have disabled tests that add a fragment to the <link> tag until WebKit respects fragments for prerender/prefetch/subresource link handling. BUG=79898,83901 TEST=PrerenderBrowserTest.Prerender*Fragment* Review URL: http://codereview.chromium.org/6992070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86890 0039d316-1c4b-4281-b951-d872f2087c98
* Remove a chrome dependency by removing Prerender from ResourceDispatcherHost.dominich@chromium.org2011-05-251-4/+7
| | | | | | | | | BUG=82590,77090 TEST=Prerender* Review URL: http://codereview.chromium.org/6966017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86667 0039d316-1c4b-4281-b951-d872f2087c98
* For PPLT recording, fix order of checks so that matched PPLT for thetburkard@chromium.org2011-05-241-6/+6
| | | | | | | control group are recorded properly. Review URL: http://codereview.chromium.org/7065043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86507 0039d316-1c4b-4281-b951-d872f2087c98
* Handle <link rel=prerender> in chrome.gavinp@chromium.org2011-05-241-6/+6
| | | | | | | | | | | | | | | | This new link rel type is being used for the prerendering experiment instead of prefetch; this CL depends on webkit patch https://bugs.webkit.org/show_bug.cgi?id=61297 landing, but, together with that patch, chrome properly interprets and responds to link rel=prerender to launch prerendering. BUG=none TEST=PrerenderBrowserTest.* Review URL: http://codereview.chromium.org/6966016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86465 0039d316-1c4b-4281-b951-d872f2087c98
* Fix compile error.jam@chromium.org2011-05-241-1/+1
| | | | | | Review URL: http://codereview.chromium.org/6992028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86440 0039d316-1c4b-4281-b951-d872f2087c98
* Fix PPLT metric for the new TabContents based prerenderingtburkard@chromium.org2011-05-231-0/+9
| | | | | | | R=cbentzel@chromium.org, dominich@chromium.org Review URL: http://codereview.chromium.org/7066011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86364 0039d316-1c4b-4281-b951-d872f2087c98
* Ensure that PageID's of prerendered pages do not exceed the Page ID of thetburkard@chromium.org2011-05-231-0/+6
| | | | | | | | current tab where they are swapped in. R=dominich@chromium.org Review URL: http://codereview.chromium.org/7059019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86299 0039d316-1c4b-4281-b951-d872f2087c98
* Changes to not use the prerendered contents when window.opener needs to be set.shishir@chromium.org2011-05-221-3/+20
| | | | | | | | | | | | | | BUG=79922 TEST=browser_tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=85394 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=85689 Review URL: http://codereview.chromium.org/6915019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86242 0039d316-1c4b-4281-b951-d872f2087c98