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

Unified Diff: chrome/browser/prerender/prerender_manager.h

Issue 9270018: Make a separate histogram for MatchComplete Final Status'es and (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 | « chrome/browser/prerender/prerender_histograms.cc ('k') | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_manager.h
===================================================================
--- chrome/browser/prerender/prerender_manager.h (revision 118385)
+++ chrome/browser/prerender/prerender_manager.h (working copy)
@@ -201,9 +201,13 @@
void ClearData(int clear_flags);
// Record a final status of a prerendered page in a histogram.
- void RecordFinalStatus(Origin origin,
- uint8 experiment_id,
- FinalStatus final_status) const;
+ // This variation allows specifying whether prerendering had been started
+ // (necessary to flag MatchComplete dummies).
+ void RecordFinalStatusWithMatchCompleteStatus(
+ Origin origin,
+ uint8 experiment_id,
+ PrerenderContents::MatchCompleteStatus mc_status,
+ FinalStatus final_status) const;
const Config& config() const { return config_; }
Config& mutable_config() { return config_; }
@@ -243,6 +247,8 @@
FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, FragmentMatchesPageTest);
FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, PageMatchesFragmentTest);
FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, PendingPrerenderTest);
+ FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, ControlGroupVisited);
+ FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, NoUseGroupVisited);
FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, RateLimitInWindowTest);
FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, RateLimitOutsideWindowTest);
FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, SourceRenderViewClosed);
@@ -368,6 +374,19 @@
// Used both on destruction, and when clearing the browsing history.
void DestroyAllContents(FinalStatus final_status);
+ // Helper function to destroy a PrerenderContents with the specified
+ // final_status, while at the same time recording that for the MatchComplete
+ // case, that this prerender would have been used.
+ void DestroyAndMarkMatchCompleteAsUsed(PrerenderContents* prerender_contents,
+ FinalStatus final_status);
+
+ // Record a final status of a prerendered page in a histogram.
+ // This is a helper function which will ultimately call
+ // RecordFinalStatusWthMatchCompleteStatus, using MATCH_COMPLETE_DEFAULT.
+ void RecordFinalStatus(Origin origin,
+ uint8 experiment_id,
+ FinalStatus final_status) const;
+
// The configuration.
Config config_;
« 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