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

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

Issue 11090068: When starting a provisional load include the parent frame ID in the IPC and pass it down the th WCO… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updatess Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
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/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "chrome/browser/prerender/prerender_histograms.h" 10 #include "chrome/browser/prerender/prerender_histograms.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 pixel_stats_->GetBitmap(PixelStats::BITMAP_ON_LOAD, web_contents()); 193 pixel_stats_->GetBitmap(PixelStats::BITMAP_ON_LOAD, web_contents());
194 } 194 }
195 195
196 // Reset the PPLT metric. 196 // Reset the PPLT metric.
197 pplt_load_start_ = base::TimeTicks(); 197 pplt_load_start_ = base::TimeTicks();
198 actual_load_start_ = base::TimeTicks(); 198 actual_load_start_ = base::TimeTicks();
199 } 199 }
200 200
201 void PrerenderTabHelper::DidStartProvisionalLoadForFrame( 201 void PrerenderTabHelper::DidStartProvisionalLoadForFrame(
202 int64 frame_id, 202 int64 frame_id,
203 int64 parent_frame_id,
203 bool is_main_frame, 204 bool is_main_frame,
204 const GURL& validated_url, 205 const GURL& validated_url,
205 bool is_error_page, 206 bool is_error_page,
206 content::RenderViewHost* render_view_host) { 207 content::RenderViewHost* render_view_host) {
207 if (is_main_frame) { 208 if (is_main_frame) {
208 // Record the beginning of a new PPLT navigation. 209 // Record the beginning of a new PPLT navigation.
209 pplt_load_start_ = base::TimeTicks::Now(); 210 pplt_load_start_ = base::TimeTicks::Now();
210 actual_load_start_ = base::TimeTicks(); 211 actual_load_start_ = base::TimeTicks();
211 } 212 }
212 } 213 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 // If we have not finished loading yet, record the actual load start, and 245 // If we have not finished loading yet, record the actual load start, and
245 // rebase the start time to now. 246 // rebase the start time to now.
246 actual_load_start_ = pplt_load_start_; 247 actual_load_start_ = pplt_load_start_;
247 pplt_load_start_ = base::TimeTicks::Now(); 248 pplt_load_start_ = base::TimeTicks::Now();
248 if (pixel_stats_.get()) 249 if (pixel_stats_.get())
249 pixel_stats_->GetBitmap(PixelStats::BITMAP_SWAP_IN, web_contents()); 250 pixel_stats_->GetBitmap(PixelStats::BITMAP_SWAP_IN, web_contents());
250 } 251 }
251 } 252 }
252 253
253 } // namespace prerender 254 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_tab_helper.h ('k') | chrome/browser/ui/search/search_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698