Index: content/browser/browser_main_runner.cc |
diff --git a/content/browser/browser_main_runner.cc b/content/browser/browser_main_runner.cc |
index b12ccd6da25c855ea0f831d2373e63d9ff04261f..38c235521828c49a1730ae81f1b170967cafed1e 100644 |
--- a/content/browser/browser_main_runner.cc |
+++ b/content/browser/browser_main_runner.cc |
@@ -10,6 +10,7 @@ |
#include "base/logging.h" |
#include "base/metrics/histogram.h" |
#include "base/metrics/statistics_recorder.h" |
+#include "base/time/time.h" |
#include "base/trace_event/trace_event.h" |
#include "content/browser/browser_main_loop.h" |
#include "content/browser/browser_shutdown_profile_dumper.h" |
@@ -111,6 +112,8 @@ void InstallSha256LegacyHooks() { |
#endif // _WIN64 |
} |
+base::TimeTicks g_process_startup_ticks; |
+ |
} // namespace |
#endif // OS_WIN |
@@ -134,6 +137,8 @@ class BrowserMainRunnerImpl : public BrowserMainRunner { |
if (!initialization_started_) { |
initialization_started_ = true; |
+ g_process_startup_ticks = base::TimeTicks::Now(); |
+ |
#if !defined(OS_IOS) |
if (parameters.command_line.HasSwitch(switches::kWaitForDebugger)) |
base::debug::WaitForDebugger(60, true); |
@@ -283,4 +288,10 @@ BrowserMainRunner* BrowserMainRunner::Create() { |
return new BrowserMainRunnerImpl(); |
} |
+// TODO(michaeln): Where should this go and what signal should be used? |
+bool IsBrowserStartingUp() { |
michaeln
2015/02/24 23:07:11
The startup metrics component tracks some stats li
|
+ return base::TimeTicks::Now() - g_process_startup_ticks < |
+ base::TimeDelta::FromSeconds(15); |
+} |
+ |
} // namespace content |