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

Unified Diff: base/profiler/scoped_profile.h

Issue 669813003: Update from chromium https://crrev.com/301725/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « base/posix/eintr_wrapper.h ('k') | base/profiler/scoped_profile.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/profiler/scoped_profile.h
diff --git a/base/profiler/scoped_profile.h b/base/profiler/scoped_profile.h
index 7290908c5ce9e2f456c8f73aaa1344ec83bd07be..6a76486518f10b5f82211b1ffeac240a13998257 100644
--- a/base/profiler/scoped_profile.h
+++ b/base/profiler/scoped_profile.h
@@ -35,12 +35,18 @@ class Births;
class BASE_EXPORT ScopedProfile {
public:
+ // Mode of operation. Specifies whether ScopedProfile should be a no-op or
+ // needs to create and tally a task.
+ enum Mode {
+ DISABLED, // Do nothing.
+ ENABLED // Create and tally a task.
+ };
+
+ // TODO(vadimt): Remove this constructor.
explicit ScopedProfile(const Location& location);
+ ScopedProfile(const Location& location, Mode mode);
~ScopedProfile();
- // Stop tracing prior to the end destruction of the instance.
- void StopClockAndTally();
-
private:
Births* birth_; // Place in code where tracking started.
TaskStopwatch stopwatch_;
« no previous file with comments | « base/posix/eintr_wrapper.h ('k') | base/profiler/scoped_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698