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

Unified Diff: base/logging.cc

Issue 5804004: Add Debug Message Dialog Support for Mac OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: alphabet issues Created 10 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/logging.cc
diff --git a/base/logging.cc b/base/logging.cc
index 40497bf6275e11a4b78c57a82265638d7f89c104..9d0f5e709dd848e2ad33e4e4f6f7fbe37e598236 100644
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -54,8 +54,14 @@ typedef pthread_mutex_t* MutexHandle;
#if defined(OS_POSIX)
#include "base/safe_strerror_posix.h"
#endif
+#if defined(OS_MACOSX)
viettrungluu 2010/12/14 00:03:43 I think the new convention (per some post on chrom
stuartmorgan 2010/12/14 00:04:19 I can't find the email now, but the recollection o
+#include "base/mac/scoped_cftyperef.h"
+#endif
#include "base/process_util.h"
#include "base/string_piece.h"
+#if defined(OS_MACOSX)
+#include "base/sys_string_conversions.h"
+#endif
#include "base/thread_restrictions.h"
#include "base/utf_string_conversions.h"
#include "base/vlog.h"
@@ -511,6 +517,12 @@ void DisplayDebugMessageInDialog(const std::string& str) {
argv.push_back(str);
base::LaunchApp(argv, base::file_handle_mapping_vector(), true /* wait */,
NULL);
+#elif defined(OS_MACOSX)
+ base::mac::ScopedCFTypeRef<CFStringRef> message(
+ base::SysUTF8ToCFStringRef(str));
+ CFUserNotificationDisplayNotice(0, kCFUserNotificationStopAlertLevel,
+ NULL, NULL, NULL, CFSTR("Fatal Error"),
+ message, NULL);
#else
// http://code.google.com/p/chromium/issues/detail?id=37026
NOTIMPLEMENTED();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698