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

Side by Side Diff: chrome/browser/prerender/prerender_tab_helper.cc

Issue 2494633004: Remove about:srcdoc url conversion. (Closed)
Patch Set: Rebase Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/prerender/prerender_tab_helper.h" 5 #include "chrome/browser/prerender/prerender_tab_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/metrics/histogram_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "chrome/browser/prerender/prerender_histograms.h" 10 #include "chrome/browser/prerender/prerender_histograms.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 98
99 // Reset the PPLT metric. 99 // Reset the PPLT metric.
100 pplt_load_start_ = base::TimeTicks(); 100 pplt_load_start_ = base::TimeTicks();
101 actual_load_start_ = base::TimeTicks(); 101 actual_load_start_ = base::TimeTicks();
102 } 102 }
103 103
104 void PrerenderTabHelper::DidStartProvisionalLoadForFrame( 104 void PrerenderTabHelper::DidStartProvisionalLoadForFrame(
105 content::RenderFrameHost* render_frame_host, 105 content::RenderFrameHost* render_frame_host,
106 const GURL& validated_url, 106 const GURL& validated_url,
107 bool is_error_page, 107 bool is_error_page) {
108 bool is_iframe_srcdoc) {
109 if (render_frame_host->GetParent()) 108 if (render_frame_host->GetParent())
110 return; 109 return;
111 110
112 // Record PPLT state for the beginning of a new navigation. 111 // Record PPLT state for the beginning of a new navigation.
113 pplt_load_start_ = GetTimeTicksFromPrerenderManager(); 112 pplt_load_start_ = GetTimeTicksFromPrerenderManager();
114 actual_load_start_ = base::TimeTicks(); 113 actual_load_start_ = base::TimeTicks();
115 114
116 if (next_load_is_control_prerender_) { 115 if (next_load_is_control_prerender_) {
117 DCHECK_EQ(NAVIGATION_TYPE_NORMAL, navigation_type_); 116 DCHECK_EQ(NAVIGATION_TYPE_NORMAL, navigation_type_);
118 navigation_type_ = NAVIGATION_TYPE_WOULD_HAVE_BEEN_PRERENDERED; 117 navigation_type_ = NAVIGATION_TYPE_WOULD_HAVE_BEEN_PRERENDERED;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 prerender_manager->RecordPerceivedPageLoadTime( 187 prerender_manager->RecordPerceivedPageLoadTime(
189 origin_, navigation_type_, perceived_page_load_time, 188 origin_, navigation_type_, perceived_page_load_time,
190 fraction_plt_elapsed_at_swap_in, url_); 189 fraction_plt_elapsed_at_swap_in, url_);
191 190
192 // Reset state for the next navigation. 191 // Reset state for the next navigation.
193 navigation_type_ = NAVIGATION_TYPE_NORMAL; 192 navigation_type_ = NAVIGATION_TYPE_NORMAL;
194 origin_ = ORIGIN_NONE; 193 origin_ = ORIGIN_NONE;
195 } 194 }
196 195
197 } // namespace prerender 196 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_tab_helper.h ('k') | chrome/browser/tracing/navigation_tracing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698