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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2332423003: Remove old prefetcher histogram code in render_frame_impl (Closed)
Patch Set: Remove old prefetcher histogram code Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/renderer/document_state.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 7f7349ab3265b2251098e10c728cdc2ea33885c5..478cd280a421f866e0e9c7806f154eedf3a911a7 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -3092,33 +3092,6 @@ void RenderFrameImpl::didCreateDataSource(blink::WebLocalFrame* frame,
UpdateNavigationState(document_state, false /* was_within_same_page */,
content_initiated);
- // DocumentState::referred_by_prefetcher_ is true if we are
- // navigating from a page that used prefetching using a link on that
- // page. We are early enough in the request process here that we
- // can still see the DocumentState of the previous page and set
- // this value appropriately.
- // TODO(gavinp): catch the important case of navigation in a new
- // renderer process.
- if (webview) {
- if (WebFrame* old_frame = webview->mainFrame()) {
- const WebURLRequest& original_request = datasource->originalRequest();
- const GURL referrer(blink::WebStringToGURL(
- original_request.httpHeaderField(WebString::fromUTF8("Referer"))));
- if (!referrer.is_empty() && old_frame->isWebLocalFrame() &&
- DocumentState::FromDataSource(old_frame->dataSource())
- ->was_prefetcher()) {
- for (; old_frame; old_frame = old_frame->traverseNext(false)) {
- WebDataSource* old_frame_datasource = old_frame->dataSource();
- if (old_frame_datasource &&
- referrer == GURL(old_frame_datasource->request().url())) {
- document_state->set_was_referred_by_prefetcher(true);
- break;
- }
- }
- }
- }
- }
-
if (content_initiated) {
const WebURLRequest& request = datasource->request();
switch (request.getCachePolicy()) {
@@ -4090,19 +4063,6 @@ void RenderFrameImpl::willSendRequest(blink::WebLocalFrame* frame,
}
}
- // TODO(creis): Update prefetching to work with out-of-process iframes.
- WebFrame* top_frame = frame->top();
- if (top_frame && top_frame->isWebLocalFrame()) {
- DocumentState* top_document_state =
- DocumentState::FromDataSource(top_frame->dataSource());
- if (top_document_state) {
- // TODO(gavinp): separate out prefetching and prerender field trials
- // if the rel=prerender rel type is sticking around.
- if (request.getRequestContext() == WebURLRequest::RequestContextPrefetch)
- top_document_state->set_was_prefetcher(true);
- }
- }
-
// This is an instance where we embed a copy of the routing id
// into the data portion of the message. This can cause problems if we
// don't register this id on the browser side, since the download manager
« no previous file with comments | « content/public/renderer/document_state.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698