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

Unified Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

Issue 2773973002: Add Startup.BrowserView.FirstPaint / .CompositingEnded histograms. (Closed)
Patch Set: Fix gab's and asvitkine's remarks. Created 3 years, 8 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/browser/ui/cocoa/browser_window_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
index 7e1c93c050168d7647b97a64cfe6dd1846aebfba..9b10f94dccb7c019b7cc52f55c7f12950cbaa568 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -16,6 +16,7 @@
#include "chrome/browser/download/download_shelf.h"
#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/extensions/tab_helper.h"
+#include "chrome/browser/metrics/browser_window_histogram_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_window.h"
#include "chrome/browser/shell_integration.h"
@@ -175,6 +176,12 @@ void BrowserWindowCocoa::Show() {
// substantial part of startup time when any CALayers are part of the
// window's NSView heirarchy.
[window() makeKeyAndOrderFront:controller_];
+
+ // At this point all the Browser's UI is painted on the screen. There's no
+ // need to wait for the compositor, so pass the nullptr instead and don't
+ // store the returned instance.
+ BrowserWindowHistogramHelper::
+ RecordValueAndMaybeCreateInstanceOnBrowserPainted(nullptr);
}
// When creating windows from nibs it is necessary to |makeKeyAndOrderFront:|

Powered by Google App Engine
This is Rietveld 408576698