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

Side by Side Diff: base/at_exit.cc

Issue 6759017: iwyu: Cleanup in the following files: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copyright again. Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/atomicops.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6
7 #include <stddef.h>
8 #include <ostream>
9
6 #include "base/logging.h" 10 #include "base/logging.h"
7 11
8 namespace base { 12 namespace base {
9 13
10 // Keep a stack of registered AtExitManagers. We always operate on the most 14 // Keep a stack of registered AtExitManagers. We always operate on the most
11 // recent, and we should never have more than one outside of testing, when we 15 // recent, and we should never have more than one outside of testing, when we
12 // use the shadow version of the constructor. We don't protect this for 16 // use the shadow version of the constructor. We don't protect this for
13 // thread-safe access, since it will only be modified in testing. 17 // thread-safe access, since it will only be modified in testing.
14 static AtExitManager* g_top_manager = NULL; 18 static AtExitManager* g_top_manager = NULL;
15 19
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 callback_and_param.func_(callback_and_param.param_); 62 callback_and_param.func_(callback_and_param.param_);
59 } 63 }
60 } 64 }
61 65
62 AtExitManager::AtExitManager(bool shadow) : next_manager_(g_top_manager) { 66 AtExitManager::AtExitManager(bool shadow) : next_manager_(g_top_manager) {
63 DCHECK(shadow || !g_top_manager); 67 DCHECK(shadow || !g_top_manager);
64 g_top_manager = this; 68 g_top_manager = this;
65 } 69 }
66 70
67 } // namespace base 71 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/atomicops.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698