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

Unified Diff: chrome/browser/metrics/first_web_contents_profiler.h

Issue 2388803003: Fix FirstWebContentsProfiler not getting created when using session restore. (Closed)
Patch Set: Created 4 years, 2 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/metrics/first_web_contents_profiler.h
diff --git a/chrome/browser/metrics/first_web_contents_profiler.h b/chrome/browser/metrics/first_web_contents_profiler.h
index 9be6153a455894374e421ac1adc4ef08febd4f81..3143d7e7a7e00fd688a79dc15d8d242f5f5fd9b1 100644
--- a/chrome/browser/metrics/first_web_contents_profiler.h
+++ b/chrome/browser/metrics/first_web_contents_profiler.h
@@ -20,7 +20,10 @@ class WebContents;
// class.
class FirstWebContentsProfiler : public content::WebContentsObserver {
public:
- explicit FirstWebContentsProfiler(content::WebContents* web_contents);
+ // Creates a profiler for the active web contents. If there are multiple
+ // browsers, the first one is chosen. The resulting FirstWebContentsProfiler
+ // owns itself.
+ static void WebContentsStarted(content::WebContents* web_contents);
private:
// Reasons for which profiling is deemed complete. Logged in UMA (do not re-
@@ -40,7 +43,7 @@ class FirstWebContentsProfiler : public content::WebContentsObserver {
ABANDON_NAVIGATION_ERROR = 5,
ENUM_MAX
};
-
+ explicit FirstWebContentsProfiler(content::WebContents* web_contents);
~FirstWebContentsProfiler() override = default;
// content::WebContentsObserver:

Powered by Google App Engine
This is Rietveld 408576698