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

Unified Diff: chrome/common/startup_metric_utils.h

Issue 10662046: Add a histogram to measure browser window display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix indent Created 8 years, 5 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
Index: chrome/common/startup_metric_utils.h
diff --git a/chrome/common/startup_metric_utils.h b/chrome/common/startup_metric_utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..15bac1c571f970a1478e2dac9ab74dcd0094b641
--- /dev/null
+++ b/chrome/common/startup_metric_utils.h
@@ -0,0 +1,27 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_COMMON_STARTUP_METRIC_UTILS_H_
+#define CHROME_COMMON_STARTUP_METRIC_UTILS_H_
+
+// Utility functions to support metric collection for browser startup.
+
+class StartupMetricUtils {
sky 2012/07/25 15:51:48 No need to for a class here, use functions.
jeremy 2012/07/26 12:57:26 Done.
+ public:
+ // Returns true if any UI other than the browser window has been displayed
+ // so far. Useful to test if UI has been displayed before the first browser
+ // window was shown, which would invalidate any surrounding timing metrics.
+ static bool WasNonBrowserUIDisplayed();
+
+ // Call this when displaying UI that might potentially delay the appearance
+ // of the initial browser window on Chrome startup.
+ //
+ // Note on usage: This function is idempotent and its overhead is low enough
+ // in comparison with UI display that it's OK to call it on every
+ // UI invocation regardless of whether the browser window has already
+ // been displayed or not.
+ static void SetNonBrowserUIDisplayed();
+};
+
+#endif // CHROME_COMMON_STARTUP_METRIC_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698