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

Unified Diff: chrome/browser/tab_contents/tab_contents.h

Issue 242107: Add histograms that track how long it takes to open the new tab page. (Closed)
Patch Set: comments Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/new_new_tab.js ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/tab_contents.h
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index 87aeb763c7a428313ba1f170137df76bf8c2e7fc..83613ba44c31ff05d9bf32937f8b533add39e12e 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -617,6 +617,16 @@ class TabContents : public PageNavigator,
opener_dom_ui_type_ = opener_dom_ui_type;
}
+ // We want to time how long it takes to create a new tab page. This method
+ // gets called as parts of the new tab page have loaded.
+ void LogNewTabTime(const std::string& event_name);
+
+ // Set the time when we started to create the new tab page. This time is
+ // from before we created this TabContents.
+ void set_new_tab_start_time(const base::TimeTicks& time) {
+ new_tab_start_time_ = time;
+ }
+
private:
friend class NavigationController;
// Used to access the child_windows_ (ConstrainedWindowList) for testing
@@ -1151,6 +1161,9 @@ class TabContents : public PageNavigator,
// non-NULL and represent the DOMUI of the opening renderer.
DOMUITypeID opener_dom_ui_type_;
+ // The time that we started to create the new tab page.
+ base::TimeTicks new_tab_start_time_;
+
// ---------------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(TabContents);
« no previous file with comments | « chrome/browser/resources/new_new_tab.js ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698