OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_COMMON_STARTUP_METRIC_UTILS_H_ | |
6 #define CHROME_COMMON_STARTUP_METRIC_UTILS_H_ | |
7 | |
8 // Utility functions to support metric collection for browser startup. | |
9 | |
10 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.
| |
11 public: | |
12 // Returns true if any UI other than the browser window has been displayed | |
13 // so far. Useful to test if UI has been displayed before the first browser | |
14 // window was shown, which would invalidate any surrounding timing metrics. | |
15 static bool WasNonBrowserUIDisplayed(); | |
16 | |
17 // Call this when displaying UI that might potentially delay the appearance | |
18 // of the initial browser window on Chrome startup. | |
19 // | |
20 // Note on usage: This function is idempotent and its overhead is low enough | |
21 // in comparison with UI display that it's OK to call it on every | |
22 // UI invocation regardless of whether the browser window has already | |
23 // been displayed or not. | |
24 static void SetNonBrowserUIDisplayed(); | |
25 }; | |
26 | |
27 #endif // CHROME_COMMON_STARTUP_METRIC_UTILS_H_ | |
OLD | NEW |