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