summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/navigation_state.h
Commit message (Collapse)AuthorAgeFilesLines
* FBTF: Hopefully, the last ctor patch.erg@google.com2010-10-271-38/+13
| | | | | | | | | | | With this final patch, the chrome target compiles without my new warnings. BUG=none TEST=compiles Review URL: http://codereview.chromium.org/4099006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64080 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 63536 - Might have broken tests on win.tonyg@chromium.org2010-10-221-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Factor a PageLoadHistograms class out of RenderView. No functional changes are intended. This is in anticipation of using the new WebPerformance API: http://trac.webkit.org/changeset/68141 My strategy is this: 1. In this patch, make the most minimal change possible to the Dump() method necessary to factor it out to a new class. 2. Add a new, temporary histograms which log the WebPerformance metrics which have an existing counterparts. 3. Once we understand any differences and are happy with the new metrics, rip out the old ones. This will allow more cleanup in RenderView and NavigationState. 4. Add new histograms for any interesting WebPerformance metrics which weren't previously available. BUG=none TEST=none Review URL: http://codereview.chromium.org/3502005 TBR=dmaclach@chromium.org Review URL: http://codereview.chromium.org/4061004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63569 0039d316-1c4b-4281-b951-d872f2087c98
* Factor a PageLoadHistograms class out of RenderView.tonyg@chromium.org2010-10-221-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | No functional changes are intended. This is in anticipation of using the new WebPerformance API: http://trac.webkit.org/changeset/68141 My strategy is this: 1. In this patch, make the most minimal change possible to the Dump() method necessary to factor it out to a new class. 2. Add a new, temporary histograms which log the WebPerformance metrics which have an existing counterparts. 3. Once we understand any differences and are happy with the new metrics, rip out the old ones. This will allow more cleanup in RenderView and NavigationState. 4. Add new histograms for any interesting WebPerformance metrics which weren't previously available. BUG=none TEST=none Review URL: http://codereview.chromium.org/3502005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63536 0039d316-1c4b-4281-b951-d872f2087c98
* Uses an internal error page on some of the more common http errors, and a ↵mmenke@chromium.org2010-09-131-0/+7
| | | | | | | | | | | few obscure ones. Will only display the error page if 0 bytes are received along with a recognized http error code. BUG=43767 TEST=Find an http server that returns 0-length responses with error codes... Review URL: http://codereview.chromium.org/3195005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59258 0039d316-1c4b-4281-b951-d872f2087c98
* Do not refetch or clear the accessibility tree if the navigation is within ↵kkania@chromium.org2010-08-251-0/+6
| | | | | | | | | | the same page. This happens with links pointing to a location within the current page. BUG=52943 TEST=none Review URL: http://codereview.chromium.org/3205002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57387 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up PLT histograms for a move to navigator_state.ccjar@chromium.org2010-08-151-21/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up PLT gathering in preparation for moving it to take place in navigation_state.cc, during the instance destructor. This CL should have almost no semantic impact, and I'm submitting it separately so that when I move large blocks, I can mostly move them unchanged. Add a bunch of DCHECKs to be sure that finish and finish_doc times are only set once, and that they are set only in the correct order. In a future CL, I expect to push a lot of the time-gathering code into navigation_state.cc, along with the generation of the final histograms. The challenge is to mark the NavigationState instances that are worthy of recording (which looks like it MAY be done by marking the state with the boolean to indicate it is part of an HTTP or HTTPS connection), and make sure we have good numbers throughout. bug=48970 r=mbelshe Review URL: http://codereview.chromium.org/2993004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56164 0039d316-1c4b-4281-b951-d872f2087c98
* Histograms & Field Trails about prefetchinggavinp@google.com2010-08-091-1/+17
| | | | | | | | | | | | This CL lands some histograms to track prefetching, and a 10% field trial enabling the feature to track performance. BUG=none TEST=none Review URL: http://codereview.chromium.org/3036050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55431 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Initialize was_alternate_protocol_available_.lzheng@chromium.org2010-07-141-1/+2
| | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/2968010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52333 0039d316-1c4b-4281-b951-d872f2087c98
* Add field trial stats for alternate_protocol. The histogram we collected are: lzheng@chromium.org2010-06-261-0/+8
| | | | | | | | | | | | | | | | | | | | | http stats when alternate protocol is available but npn was not negotiated ( which means not usng spdy), and when alternate is available AND spdy is used. Noticable changes: 1. In http_network_transaction.cc, changed the logic that always parse response from server for alternate protocol and remember that in HttpAlternateProtocols strucuture. We need to remember this to collect stats for servers with alternate protocol support but used http for. 2. In spdy_stream.cc, get rid of the response copy from spdy_stream. This copy overwrites some early status in response set in http_network_transaction. TEST=http_network_transaction_unittest.cc BUG=46689 Review URL: http://codereview.chromium.org/2808010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50927 0039d316-1c4b-4281-b951-d872f2087c98
* Track whether a page was loaded via a proxy so that we canmbelshe@chromium.org2010-06-101-2/+7
| | | | | | | | | | | evaluate performance. BUG=none TEST=none Review URL: http://codereview.chromium.org/2764004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49468 0039d316-1c4b-4281-b951-d872f2087c98
* This change enables FieldTrial for SPDY. When --use-spdy=npn is used, field ↵lzheng@chromium.org2010-05-211-0/+6
| | | | | | | | | | | | | | | | | test won't be enabled. However, when that flag is missing, A/B test is added to browser_main.cc. Trial A: use npn and spdy. B: use npn but no spdy. C: do nothing. A and B are set to zero for now The histograms we collect are: 1. Page begin to finish time when spdy is enabled/disabled across all sites; 2. Page begin to finish time when spdy is used on sites that support spdy and when spdy is intentionally ignored. BUG=43997 TEST=Don't use --use-spdy=npn, manually change _npn_nospdy and _npn_withspdy percentile and go to spdy supported sites. Review URL: http://codereview.chromium.org/2036012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47896 0039d316-1c4b-4281-b951-d872f2087c98
* Send session history offset and length parameters in the Navigate message todarin@chromium.org2010-03-181-3/+15
| | | | | | | | | | | | | keep the renderer's notion of those values properly synchronized with the NavigationController. R=brettw BUG=18062 TEST=see session_history_uitest.cc Review URL: http://codereview.chromium.org/1090002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42022 0039d316-1c4b-4281-b951-d872f2087c98
* Send "content blocked" ipc messages even more reliably.thakis@chromium.org2010-02-151-13/+0
| | | | | | | | | | | | | | | This effectively reverts patch set 6 from http://codereview.chromium.org/596039 and adds patch set 1 instead. Also add a regression test to make sure the bug is actually fixed. The problem with using navigation state was that allowScripts() was still called before the FrameNavigate message was sent. BUG=35011 TEST=See bug. Review URL: http://codereview.chromium.org/608001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39040 0039d316-1c4b-4281-b951-d872f2087c98
* Send "content blocked" ipc messages more reliably.thakis@chromium.org2010-02-121-0/+13
| | | | | | | | | | | | | | | | | | | I believe that the bug happened in this sequence of events: 1.) JS gets blocked on the web page, icon appears. The renderer (correctly) thinks js is blocked. 2.) User hits "reload" 3.) RenderView::didCommitProvisionalLoad() calls RenderView::UpdateURL() which sends ViewHostMsg_FrameNavigate to the browser which clears the content settings images in the location bar 4.) RenderView::allowScripts() gets called during page loading. The renderer still thinks that js is blocked and hence doesn't notify the browser. 5.) RenderView::didReceiveResponse() clears the content blocked flags (too late) This CL moves the content blocked flags into navigationstate, which should prevent this "race" because there's one new navigationstate per page. BUG=35011 TEST=See bug. Review URL: http://codereview.chromium.org/596039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38877 0039d316-1c4b-4281-b951-d872f2087c98
* The translate feature was only translating the main frame of the page.jcampan@chromium.org2010-02-091-1/+8
| | | | | | | | | | | This CL makes it also translate frames and iframes. BUG=34533 TEST=See bug for repro case. Review URL: http://codereview.chromium.org/577032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38475 0039d316-1c4b-4281-b951-d872f2087c98
* Further divide PLT metrics based on cache policyjar@chromium.org2010-02-071-6/+10
| | | | | | | | | | | | | Divided the case of link-navigation based on whether the cache was being used. Many histograms were further divided. I depricated one enum so that the existing histogram could be compared better. r=darin Review URL: http://codereview.chromium.org/582010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38329 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Implement HostContentSettingsMap"evan@chromium.org2010-01-291-11/+1
| | | | | | | | This reverts commit r37508, as it was crashing on the reliability bots. Review URL: http://codereview.chromium.org/556076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37519 0039d316-1c4b-4281-b951-d872f2087c98
* Implement HostContentSettingsMapjochen@chromium.org2010-01-291-1/+11
| | | | | | | | | | | This map stores whether a given host may load images or use plugins and javascript. And makes this information available to the render view BUG=32782 TEST=none Review URL: http://codereview.chromium.org/551149 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37508 0039d316-1c4b-4281-b951-d872f2087c98
* Separate out page-load-times to distinguish reload etc.jar@chromium.org2010-01-271-0/+15
| | | | | | | | | | | | | | | | | from navigation We now have 4 categories, and we gather histogram for each of those categories. In addition, I transitioned all the A/B experiments to use the data only when a "real" navigation takes place, and not when a reload or back/forward is instigated. BUG=33229 r=darin Review URL: http://codereview.chromium.org/555109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37244 0039d316-1c4b-4281-b951-d872f2087c98
* Enable JS detection of whether SPDY was used to load a web page.mbelshe@google.com2010-01-111-1/+8
| | | | | | | | | | | | Augments the loadTimes() API with a new field, "wasFetchedViaSpdy". BUG=31615 TEST=flip_network_transaction_unittest Review URL: http://codereview.chromium.org/518039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35943 0039d316-1c4b-4281-b951-d872f2087c98
* Upstreaming WebKit.gypyaar@chromium.org2009-11-121-2/+2
| | | | | | | | | | | | This mega patch contains a few simple but tightly dependent changes: 1. Deletion of webkit/api/WebKit.gyp. The file now lives in webkit.org. 2. Rename of webkit/webkit.gyp to webkit/webkit_glue.gyp. Having two webkit.gyp was a source of developer confusion. 3. Gyp dependencies are updated across chromium to point at the upstream WebKit.gyp and the renamed webkit_glue.gyp. 4. Some 200+ files include paths fixed to point to third_party/WebKit/WebKit/chromium instead of webkit/api. The later will be deleted in a subsequent patch. Review URL: http://codereview.chromium.org/387020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31749 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug introduced during merging.sky@chromium.org2009-11-041-1/+1
| | | | | | | | | | BUG=none TEST=none TBR=rafaelw Review URL: http://codereview.chromium.org/358001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30894 0039d316-1c4b-4281-b951-d872f2087c98
* Changes session restore to use a normal load rather than preferringsky@chromium.org2009-11-031-0/+26
| | | | | | | | | | | | the cache. We need to do this else we don't honor page expiration and end up showing stale data for some sites. BUG=21195 TEST=make sure session restore works. Review URL: http://codereview.chromium.org/341043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30892 0039d316-1c4b-4281-b951-d872f2087c98
* Re-commit "Add new user script injection point:aa@chromium.org2009-11-031-1/+11
| | | | | | | | | | | document_idle." Original code review: http://codereview.chromium.org/339064 BUG=26126 TBR=rafaelw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30796 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r30784aa@chromium.org2009-11-031-11/+1
| | | | | | TBR=rafaelw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30787 0039d316-1c4b-4281-b951-d872f2087c98
* Add new user script injection point "document_idle" and make it the default.aa@chromium.org2009-11-031-1/+11
| | | | | | | | | | | | | Semantically, document-idle means "when the DOM is ready and layout has been idle for awhile", or more loosely, "as soon as we get around to it". Right now this uses a simple heuristic. It injects scripts 200ms after DOMContentLoaded, or immediately after onload, whichever happens first. BUG=26126 TEST=Manual. Extensions with content scripts should work. Review URL: http://codereview.chromium.org/339064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30784 0039d316-1c4b-4281-b951-d872f2087c98
* Move SearchableFormData over to the WebKit API.pkasting@chromium.org2009-10-231-6/+8
| | | | | | | | BUG=24621 TEST=none Review URL: http://codereview.chromium.org/306057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29941 0039d316-1c4b-4281-b951-d872f2087c98
* Move alternate 404 error page loading out of WebFrame and into RenderView.darin@chromium.org2009-08-041-1/+21
| | | | | | | | | | | | | | | | This involved adding a new method on WebViewDelegate to allow the embedder to intercept data being loaded for a document. I also had to plumb a few more FrameLoaderClient notifications through WebViewDelegate. See DidReceiveResponse and DidFinishLoading. R=tony BUG=15648 TEST=covered by errorpage_uitest.cc Review URL: http://codereview.chromium.org/160578 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22389 0039d316-1c4b-4281-b951-d872f2087c98
* Move alternate error page loading out of WebFrame.darin@chromium.org2009-08-021-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the RenderView be in charge of loading alternate error pages. While working on this change, I noticed several related bugs: 1- Loading an URL with an invalid host name from the new tab page results in an error page. If you hit back and then forward, you will be left with an empty location bar. In a debug build this trips an assertion in ClassifyNavigation because the given page_id is -1. This problem is caused by not duplicating the NavigationState of the failed load when creating a load for the error page. Hence, the pending_page_id of the forward navigation is lost. 2- Loading an URL with an invalid host name as a subframe results in an extra navigation in session history. One navigation for the main frame and one navigation for the error page load. This is another symptom of the problem described in #1. However, the solution is different. Here, we need to know that the subframe load is an AUTO_SUBFRAME load so that we load the error page using 'replace' semantics (so that WebCore does not generate a new session history entry). Finally, I decided to restrict alternative DNS error pages to only work for the main frame to match what we do for alternative 404 error pages. It doesn't seem worth it to show link doctor results for subframes since their primary purpose is to assist people who mis-type an URL. R=tony,brettw BUG=15648 TEST=covered by errorpage_uitest.cc Review URL: http://codereview.chromium.org/159575 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22253 0039d316-1c4b-4281-b951-d872f2087c98
* Add Reload and LoadData methods to WebFrame. LoadData replacesdarin@chromium.org2009-07-011-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LoadAlternateHTMLString, changing types to WebKit API types and allowing for more flexibility (supports loading non-HTML data). LoadHTMLString is modified to support some optional parameters. Note: Since WebFrame is going to soon be part of the WebKit API, it is OK style-wise for it to use optional parameters. This patch also includes a change to remove the securityInfo property from WebURLRequest. I did this so that I could eliminate the need to pass a WebURLRequest to LoadData / LoadHTMLString. This also fixes a TODO of mine to eliminate this field on WebCore::ResourceRequest since securityInfo (SSL cert info) is really more of a response property. It was only part of the request as a hack to support certain error pages. I work around that by leveraging NavigationState in chrome/renderer. I added some templatized, implicit constructors to WebData for convenience. I plan to make similar changes to WebCString and WebString in a future CL. This CL is a incremental step toward moving ResourceFetcher out of WebFrame. BUG=15648 TEST=none R=dglazkov Review URL: http://codereview.chromium.org/150146 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19742 0039d316-1c4b-4281-b951-d872f2087c98
* - Added a new time marker for loadtimes: first_paint_after_load_time. ↵davemoore@chromium.org2009-06-291-1/+20
| | | | | | | | | | | Created new histograms to expose it. Also made some new histograms that use a derived time: begin_time. This is the request_time if the page was requested by a user action, start time otherwise. Review URL: http://codereview.chromium.org/150010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19532 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for reverted cl http://codereview.chromium.org/147123davemoore@chromium.org2009-06-271-6/+15
| | | | | | | | | | | | | A recent change broke the load times. It also revealed some deficiencies. This adds a new time marker for when a load is committed, which is a more interesting value than the start of the load (which we still keep). Also, the first layout time wasn't an interesting time to keep, instead we keep the time of the first paint. The histograms were modified to use the new values when appropriate. Review URL: http://codereview.chromium.org/149099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19465 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 19361.davemoore@chromium.org2009-06-261-15/+6
| | | | | | | tbr=darin Review URL: http://codereview.chromium.org/149081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19368 0039d316-1c4b-4281-b951-d872f2087c98
* A recent change broke the load times. It also revealed some deficiencies.davemoore@chromium.org2009-06-261-6/+15
| | | | | | | | | | | | This adds a new time marker for when a load is committed, which is a more interesting value than the start of the load (which we still keep). Also, the first layout time wasn't an interesting time to keep, instead we keep the time of the first paint. The histograms were modified to use the new values when appropriate. Review URL: http://codereview.chromium.org/147123 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19361 0039d316-1c4b-4281-b951-d872f2087c98
* Delete files from webkit/glue that have been made obsolete by correspondingdarin@chromium.org2009-06-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | files in webkit/api. Here's the mapping: webkit/glue/webdatasource.h -> webkit/api/public/WebDataSource.h webkit/glue/weberror.h -> webkit/api/public/WebURLError.h webkit/glue/weburlrequest.h -> webkit/api/public/WebURLRequest.h webkit/glue/webresponse.h -> webkit/api/public/WebURLResponse.h I kept the implementation of WebDataSource in webkit/glue for now because it helps to have it close to WebFrameImpl and WebFrameLoaderClient. To facilitate this change, I needed to make use of WrappedResourceRequest and WrappedResourceResponse from webkit/api/src within the implementation files of webkit/glue. This is only a temporary usage of webkit/api/src from the outside. It will go away when WebFrame, etc. get moved into webkit/api. I modified these wrapper classes to expose the 'bind' function so that I can re-bind a wrapper. This is used in WebDataSourceImpl::request() and related methods to allow the interface to return a const reference to a WebURLRequest and WebURLResponse. The changes here are fairly mechanical. I'm not too happy about the way WebDataSource::redirectChain now works. I would prefer a solution that didn't involve so much copying, but I'm not going to worry about optimizing that now. R=brettw BUG=10041 TEST=none Review URL: http://codereview.chromium.org/126286 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18747 0039d316-1c4b-4281-b951-d872f2087c98
* Extract load times from WebDataSource. Move them to NavigationState.darin@chromium.org2009-06-161-0/+138
Move PasswordForm into the webkit_glue namespace. TEST=none BUG=10041 R=brettw Review URL: http://codereview.chromium.org/126190 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18515 0039d316-1c4b-4281-b951-d872f2087c98