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_LOGGING_H_ | 5 #ifndef BASE_LOGGING_H_ |
6 #define BASE_LOGGING_H_ | 6 #define BASE_LOGGING_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <cstring> | 9 #include <cstring> |
10 #include <sstream> | 10 #include <sstream> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/scoped_ptr.h" | |
14 | 13 |
15 // | 14 // |
16 // Optional message capabilities | 15 // Optional message capabilities |
17 // ----------------------------- | 16 // ----------------------------- |
18 // Assertion failed messages and fatal errors are displayed in a dialog box | 17 // Assertion failed messages and fatal errors are displayed in a dialog box |
19 // before the application exits. However, running this UI creates a message | 18 // before the application exits. However, running this UI creates a message |
20 // loop, which causes application messages to be processed and potentially | 19 // loop, which causes application messages to be processed and potentially |
21 // dispatched to existing application windows. Since the application is in a | 20 // dispatched to existing application windows. Since the application is in a |
22 // bad state when this assertion dialog is displayed, these messages may not | 21 // bad state when this assertion dialog is displayed, these messages may not |
23 // get processed and hang the dialog, or the application might go crazy. | 22 // get processed and hang the dialog, or the application might go crazy. |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 #elif NOTIMPLEMENTED_POLICY == 4 | 616 #elif NOTIMPLEMENTED_POLICY == 4 |
618 #define NOTIMPLEMENTED() LOG(ERROR) << NOTIMPLEMENTED_MSG | 617 #define NOTIMPLEMENTED() LOG(ERROR) << NOTIMPLEMENTED_MSG |
619 #elif NOTIMPLEMENTED_POLICY == 5 | 618 #elif NOTIMPLEMENTED_POLICY == 5 |
620 #define NOTIMPLEMENTED() do {\ | 619 #define NOTIMPLEMENTED() do {\ |
621 static int count = 0;\ | 620 static int count = 0;\ |
622 LOG_IF(ERROR, 0 == count++) << NOTIMPLEMENTED_MSG;\ | 621 LOG_IF(ERROR, 0 == count++) << NOTIMPLEMENTED_MSG;\ |
623 } while(0) | 622 } while(0) |
624 #endif | 623 #endif |
625 | 624 |
626 #endif // BASE_LOGGING_H_ | 625 #endif // BASE_LOGGING_H_ |
OLD | NEW |