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

Unified Diff: base/run_loop.cc

Issue 445413003: Creating a framework for suppressing pollution of the profiler data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More jar@ comments Created 6 years, 3 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: base/run_loop.cc
diff --git a/base/run_loop.cc b/base/run_loop.cc
index 8344aa41b1631f6946e242e9ef0efbafdee23279..da7b5a8b524cb86ee55b2cf3d29732396bf7e95d 100644
--- a/base/run_loop.cc
+++ b/base/run_loop.cc
@@ -5,6 +5,7 @@
#include "base/run_loop.h"
#include "base/bind.h"
+#include "base/tracked_objects.h"
#if defined(OS_WIN)
#include "base/message_loop/message_pump_dispatcher.h"
@@ -46,7 +47,13 @@ RunLoop::~RunLoop() {
void RunLoop::Run() {
if (!BeforeRun())
return;
- loop_->RunHandler();
+ {
jar (doing other things) 2014/09/05 04:36:05 nit: You probably don't need curlies, unless the d
vadimt 2014/09/05 20:25:54 Done.
+ // Use task stopwatch to exclude the loop run time from the current task, if
+ // any.
+ tracked_objects::TaskStopwatch stopwatch;
+ loop_->RunHandler();
+ stopwatch.Stop();
+ }
AfterRun();
}

Powered by Google App Engine
This is Rietveld 408576698