| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MOJO_PUBLIC_CPP_ENVIRONMENT_LIB_SCOPED_TASK_TRACKING_H_ | |
| 6 #define MOJO_PUBLIC_CPP_ENVIRONMENT_LIB_SCOPED_TASK_TRACKING_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "mojo/public/cpp/environment/task_tracker.h" | |
| 10 | |
| 11 namespace mojo { | |
| 12 namespace internal { | |
| 13 | |
| 14 // An RAII wrapper for |TaskTrackingId|. | |
| 15 class ScopedTaskTracking { | |
| 16 public: | |
| 17 ScopedTaskTracking(const char* function_name, | |
| 18 const char* file_name, | |
| 19 int line, | |
| 20 const void* program_counter); | |
| 21 ScopedTaskTracking(const char* function_name, | |
| 22 const char* file_name, | |
| 23 int line); | |
| 24 ~ScopedTaskTracking(); | |
| 25 | |
| 26 private: | |
| 27 TaskTrackingId id_; | |
| 28 DISALLOW_COPY_AND_ASSIGN(ScopedTaskTracking); | |
| 29 }; | |
| 30 | |
| 31 } // namespace internal | |
| 32 } // namespace mojo | |
| 33 | |
| 34 #endif // MOJO_PUBLIC_CPP_ENVIRONMENT_LIB_SCOPED_TASK_TRACKING_H_ | |
| OLD | NEW |