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

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

Issue 2287993003: [NoStatePrefetch] Add UMA histogram to count prefetch requests (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.
203 void RecordResourcePrefetch(Origin origin,
204 bool is_main_resource,
205 bool is_no_store);
206
202 static PrerenderManagerMode GetMode(); 207 static PrerenderManagerMode GetMode();
203 static void SetMode(PrerenderManagerMode mode); 208 static void SetMode(PrerenderManagerMode mode);
204 static bool IsPrerenderingPossible(); 209 static bool IsPrerenderingPossible();
205 static bool ActuallyPrerendering(); 210 static bool ActuallyPrerendering();
206 static bool IsControlGroup(); 211 static bool IsControlGroup();
207 static bool IsNoUseGroup(); 212 static bool IsNoUseGroup();
208 static bool IsNoStatePrefetch(); 213 static bool IsNoStatePrefetch();
209 214
210 // Query the list of current prerender pages to see if the given web contents 215 // Query the list of current prerender pages to see if the given web contents
211 // is prerendering a page. The optional parameter |origin| is an output 216 // is prerendering a page. The optional parameter |origin| is an output
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 // Set of process hosts being prerendered. 575 // Set of process hosts being prerendered.
571 using PrerenderProcessSet = std::set<content::RenderProcessHost*>; 576 using PrerenderProcessSet = std::set<content::RenderProcessHost*>;
572 PrerenderProcessSet prerender_process_hosts_; 577 PrerenderProcessSet prerender_process_hosts_;
573 578
574 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); 579 DISALLOW_COPY_AND_ASSIGN(PrerenderManager);
575 }; 580 };
576 581
577 } // namespace prerender 582 } // namespace prerender
578 583
579 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 584 #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