OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 BASE_AT_EXIT_H_ | 5 #ifndef BASE_AT_EXIT_H_ |
6 #define BASE_AT_EXIT_H_ | 6 #define BASE_AT_EXIT_H_ |
7 | 7 |
8 #include <stack> | 8 #include <stack> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 void* param_; | 59 void* param_; |
60 }; | 60 }; |
61 | 61 |
62 Lock lock_; | 62 Lock lock_; |
63 std::stack<CallbackAndParam> stack_; | 63 std::stack<CallbackAndParam> stack_; |
64 AtExitManager* next_manager_; // Stack of managers to allow shadowing. | 64 AtExitManager* next_manager_; // Stack of managers to allow shadowing. |
65 | 65 |
66 DISALLOW_COPY_AND_ASSIGN(AtExitManager); | 66 DISALLOW_COPY_AND_ASSIGN(AtExitManager); |
67 }; | 67 }; |
68 | 68 |
| 69 #if defined(UNIT_TEST) |
| 70 class ShadowingAtExitManager : public AtExitManager { |
| 71 public: |
| 72 ShadowingAtExitManager() : AtExitManager(true) {} |
| 73 }; |
| 74 #endif // defined(UNIT_TEST) |
| 75 |
69 } // namespace base | 76 } // namespace base |
70 | 77 |
71 #endif // BASE_AT_EXIT_H_ | 78 #endif // BASE_AT_EXIT_H_ |
OLD | NEW |