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

Side by Side Diff: base/at_exit.cc

Issue 6880166: Improving logging in /app, /base, /crypto and /ipc. Updating plain DCHECK() usages for DCHECK_EQ/LE/ (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Static casting to DWORD to fix type mismatch 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 | « app/win/iat_patch_function.cc ('k') | crypto/cssm_init.cc » ('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) 2011 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 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <ostream> 8 #include <ostream>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 15 matching lines...) Expand all
26 DCHECK(!g_top_manager); 26 DCHECK(!g_top_manager);
27 #endif 27 #endif
28 g_top_manager = this; 28 g_top_manager = this;
29 } 29 }
30 30
31 AtExitManager::~AtExitManager() { 31 AtExitManager::~AtExitManager() {
32 if (!g_top_manager) { 32 if (!g_top_manager) {
33 NOTREACHED() << "Tried to ~AtExitManager without an AtExitManager"; 33 NOTREACHED() << "Tried to ~AtExitManager without an AtExitManager";
34 return; 34 return;
35 } 35 }
36 DCHECK(g_top_manager == this); 36 DCHECK_EQ(this, g_top_manager);
37 37
38 ProcessCallbacksNow(); 38 ProcessCallbacksNow();
39 g_top_manager = next_manager_; 39 g_top_manager = next_manager_;
40 } 40 }
41 41
42 // static 42 // static
43 void AtExitManager::RegisterCallback(AtExitCallbackType func, void* param) { 43 void AtExitManager::RegisterCallback(AtExitCallbackType func, void* param) {
44 if (!g_top_manager) { 44 if (!g_top_manager) {
45 NOTREACHED() << "Tried to RegisterCallback without an AtExitManager"; 45 NOTREACHED() << "Tried to RegisterCallback without an AtExitManager";
46 return; 46 return;
(...skipping 21 matching lines...) Expand all
68 callback_and_param.func_(callback_and_param.param_); 68 callback_and_param.func_(callback_and_param.param_);
69 } 69 }
70 } 70 }
71 71
72 AtExitManager::AtExitManager(bool shadow) : next_manager_(g_top_manager) { 72 AtExitManager::AtExitManager(bool shadow) : next_manager_(g_top_manager) {
73 DCHECK(shadow || !g_top_manager); 73 DCHECK(shadow || !g_top_manager);
74 g_top_manager = this; 74 g_top_manager = this;
75 } 75 }
76 76
77 } // namespace base 77 } // namespace base
OLDNEW
« no previous file with comments | « app/win/iat_patch_function.cc ('k') | crypto/cssm_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698