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

Unified Diff: chrome/browser/resource_coordinator/tab_manager_web_contents_data.h

Issue 2962773002: [Tab Metrics] Added TabManager.SessionRestore.SwitchToTab UMA. (Closed)
Patch Set: Addresses histogram.xml comments and adds standard UMA enum warning Created 3 years, 6 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/resource_coordinator/tab_manager_unittest.cc ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resource_coordinator/tab_manager_web_contents_data.h
diff --git a/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h b/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h
index b77e5cb8388a915c2097feaa31c4099f0cd876ac..3ccce436a133c9583823d4c350191994715988e7 100644
--- a/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h
+++ b/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h
@@ -29,11 +29,13 @@ namespace resource_coordinator {
// occurs in the main frame, which happens if the user navigates to a new page
// and the WebContents is reused.
//
+// These values are used in the TabManager.SessionRestore.SwitchToTab UMA.
+//
// TODO(shaseley): *switch to the new done signal (network and cpu quiescence)
// when available.
//
-// TODO(shaseley): This will become an UMA histogram once the TabManager is
-// aware of session restore begin/end and background tab loading begin/end.
+// These values are written to logs. New enum values can be added, but existing
+// enums must never be renumbered or deleted and reused.
enum TabLoadingState {
TAB_IS_NOT_LOADING = 0,
TAB_IS_LOADING = 1,
@@ -129,6 +131,7 @@ class TabManager::WebContentsData
// Needed to access tab_data_.
FRIEND_TEST_ALL_PREFIXES(TabManagerWebContentsDataTest, CopyState);
FRIEND_TEST_ALL_PREFIXES(TabManagerWebContentsDataTest, TabLoadingState);
+ FRIEND_TEST_ALL_PREFIXES(TabManagerTest, HistogramsSessionRestoreSwitchToTab);
struct Data {
Data();
« no previous file with comments | « chrome/browser/resource_coordinator/tab_manager_unittest.cc ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698