OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ATHENA_TEST_BASE_ACTIVITY_LIFETIME_TRACKER_H_ | 5 #ifndef ATHENA_TEST_BASE_ACTIVITY_LIFETIME_TRACKER_H_ |
6 #define ATHENA_TEST_BASE_ACTIVITY_LIFETIME_TRACKER_H_ | 6 #define ATHENA_TEST_BASE_ACTIVITY_LIFETIME_TRACKER_H_ |
7 | 7 |
8 #include "athena/activity/public/activity_manager_observer.h" | 8 #include "athena/activity/public/activity_manager_observer.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 // Returns the newly created activity (if any) and resets its reference. | 26 // Returns the newly created activity (if any) and resets its reference. |
27 Activity* GetNewActivityAndReset(); | 27 Activity* GetNewActivityAndReset(); |
28 | 28 |
29 // Returns a deleted activity (if any) and resets its reference. | 29 // Returns a deleted activity (if any) and resets its reference. |
30 // Note that the pointer is void* since the Activity was deleted when | 30 // Note that the pointer is void* since the Activity was deleted when |
31 // requested. | 31 // requested. |
32 void* GetDeletedActivityAndReset(); | 32 void* GetDeletedActivityAndReset(); |
33 | 33 |
34 private: | 34 private: |
35 // The activity which got created if not NULL. | 35 // The activity which got created if not nullptr. |
36 Activity* new_activity_; | 36 Activity* new_activity_; |
37 | 37 |
38 // An old activity which got unloaded if not NULL. | 38 // An old activity which got unloaded if not nullptr. |
39 void* deleted_activity_; | 39 void* deleted_activity_; |
40 | 40 |
41 DISALLOW_COPY_AND_ASSIGN(ActivityLifetimeTracker); | 41 DISALLOW_COPY_AND_ASSIGN(ActivityLifetimeTracker); |
42 }; | 42 }; |
43 | 43 |
44 } // namespace athena | 44 } // namespace athena |
45 | 45 |
46 #endif // ATHENA_TEST_BASE_ACTIVITY_LIFETIME_TRACKER_H_ | 46 #endif // ATHENA_TEST_BASE_ACTIVITY_LIFETIME_TRACKER_H_ |
47 | 47 |
OLD | NEW |