diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-30 23:54:26 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-30 23:54:26 +0000 |
commit | f6cda7598ff5c5bdd6b7b91440589fdf2d37eb55 (patch) | |
tree | 157d21e917e2bbc6caeed2e56816cb729eae6472 /base/logging.h | |
parent | 640517fdd23e08ed95cf129d27457db817ee6124 (diff) | |
download | chromium_src-f6cda7598ff5c5bdd6b7b91440589fdf2d37eb55.zip chromium_src-f6cda7598ff5c5bdd6b7b91440589fdf2d37eb55.tar.gz chromium_src-f6cda7598ff5c5bdd6b7b91440589fdf2d37eb55.tar.bz2 |
Switch to using the message loop rather than gtk_main().
Include more code from the main test_shell.cc into the GTK version. Wherever
possible the code has been copied and pasted in directly to make the future
merge easy.
Review URL: http://codereview.chromium.org/8670
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4255 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/logging.h')
-rw-r--r-- | base/logging.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/base/logging.h b/base/logging.h index 95cbfac..5fa5681 100644 --- a/base/logging.h +++ b/base/logging.h @@ -513,6 +513,14 @@ inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) { #define NOTIMPLEMENTED_POLICY 4 #endif +#if defined(COMPILER_GCC) +// On Linux, with GCC, we can use __PRETTY_FUNCTION__ to get the demangled name +// of the current function in the NOTIMPLEMENTED message. +#define NOTIMPLEMENTED_MSG "Not implemented reached in " << __PRETTY_FUNCTION__ +#else +#define NOTIMPLEMENTED_MSG "NOT IMPLEMENTED" +#endif + #if NOTIMPLEMENTED_POLICY == 0 #define NOTIMPLEMENTED() ; #elif NOTIMPLEMENTED_POLICY == 1 @@ -523,11 +531,11 @@ inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) { #elif NOTIMPLEMENTED_POLICY == 3 #define NOTIMPLEMENTED() NOTREACHED() #elif NOTIMPLEMENTED_POLICY == 4 -#define NOTIMPLEMENTED() LOG(ERROR) << "NOT IMPLEMENTED!" +#define NOTIMPLEMENTED() LOG(ERROR) << NOTIMPLEMENTED_MSG #elif NOTIMPLEMENTED_POLICY == 5 #define NOTIMPLEMENTED() do {\ static int count = 0;\ - LOG_IF(ERROR, 0 == count++) << "NOT IMPLEMENTED!";\ + LOG_IF(ERROR, 0 == count++) << NOTIMPLEMENTED_MSG;\ } while(0) #endif |