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

Side by Side Diff: chrome/browser/prerender/prerender_manager.h

Issue 2302433002: [NoStatePrefetch] Track redirects in UMA (Closed)
Patch Set: Rebase 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 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 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 // load may have started prior to navigation due to prerender hints. 192 // load may have started prior to navigation due to prerender hints.
193 // |fraction_plt_elapsed_at_swap_in| must either be in [0.0, 1.0], or a value 193 // |fraction_plt_elapsed_at_swap_in| must either be in [0.0, 1.0], or a value
194 // outside that range indicating that it doesn't apply. 194 // outside that range indicating that it doesn't apply.
195 void RecordPerceivedPageLoadTime( 195 void RecordPerceivedPageLoadTime(
196 Origin origin, 196 Origin origin,
197 NavigationType navigation_type, 197 NavigationType navigation_type,
198 base::TimeDelta perceived_page_load_time, 198 base::TimeDelta perceived_page_load_time,
199 double fraction_plt_elapsed_at_swap_in, 199 double fraction_plt_elapsed_at_swap_in,
200 const GURL& url); 200 const GURL& url);
201 201
202 // Called when a resource has been loaded by NoStatePrefetch. 202 // Called when a NoStatePrefetch request has received a response (including
203 void RecordResourcePrefetch(Origin origin, 203 // redirects). May be called several times per resource, in case of redirects.
204 bool is_main_resource, 204 void RecordPrefetchResponseReceived(Origin origin,
205 bool is_no_store); 205 bool is_main_resource,
206 bool is_redirect,
207 bool is_no_store);
208
209 // Called when a NoStatePrefetch resource has been loaded. This is called only
210 // once per resource, when all redirects have been resolved.
211 void RecordPrefetchRedirectCount(Origin origin,
212 bool is_main_resource,
213 int redirect_count);
206 214
207 static PrerenderManagerMode GetMode(); 215 static PrerenderManagerMode GetMode();
208 static void SetMode(PrerenderManagerMode mode); 216 static void SetMode(PrerenderManagerMode mode);
209 static bool IsPrerenderingPossible(); 217 static bool IsPrerenderingPossible();
210 static bool ActuallyPrerendering(); 218 static bool ActuallyPrerendering();
211 static bool IsControlGroup(); 219 static bool IsControlGroup();
212 static bool IsNoUseGroup(); 220 static bool IsNoUseGroup();
213 static bool IsNoStatePrefetch(); 221 static bool IsNoStatePrefetch();
214 222
215 // Query the list of current prerender pages to see if the given web contents 223 // Query the list of current prerender pages to see if the given web contents
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 // Set of process hosts being prerendered. 583 // Set of process hosts being prerendered.
576 using PrerenderProcessSet = std::set<content::RenderProcessHost*>; 584 using PrerenderProcessSet = std::set<content::RenderProcessHost*>;
577 PrerenderProcessSet prerender_process_hosts_; 585 PrerenderProcessSet prerender_process_hosts_;
578 586
579 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); 587 DISALLOW_COPY_AND_ASSIGN(PrerenderManager);
580 }; 588 };
581 589
582 } // namespace prerender 590 } // namespace prerender
583 591
584 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 592 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_histograms.cc ('k') | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698