summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-23 20:28:54 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-23 20:28:54 +0000
commitae3968b3e76f0fd95b9a34c762e936f0bfde65d3 (patch)
tree8351655753593306a3c79c46d081c3664ede1803 /chrome/common/extensions
parent69094b326c659f5d6d3d20bad0815af9efff3950 (diff)
downloadchromium_src-ae3968b3e76f0fd95b9a34c762e936f0bfde65d3.zip
chromium_src-ae3968b3e76f0fd95b9a34c762e936f0bfde65d3.tar.gz
chromium_src-ae3968b3e76f0fd95b9a34c762e936f0bfde65d3.tar.bz2
Add platform abstraction for simple error box, and use it in a couple extensions-related places.
Also add a virtual destructor in some unrelated infobar. BUG=27691 Review URL: http://codereview.chromium.org/427002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32840 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions')
-rw-r--r--chrome/common/extensions/extension_error_reporter.cc26
1 files changed, 4 insertions, 22 deletions
diff --git a/chrome/common/extensions/extension_error_reporter.cc b/chrome/common/extensions/extension_error_reporter.cc
index 493b1a3..6913c1e 100644
--- a/chrome/common/extensions/extension_error_reporter.cc
+++ b/chrome/common/extensions/extension_error_reporter.cc
@@ -6,16 +6,10 @@
#include "build/build_config.h"
-#if defined(OS_WIN)
-#include "app/win_util.h"
-#elif defined(OS_MACOSX)
-#include "base/scoped_cftyperef.h"
-#include "base/sys_string_conversions.h"
-#include <CoreFoundation/CFUserNotification.h>
-#endif
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/string_util.h"
+#include "chrome/common/platform_util.h"
// No AddRef required when using ExtensionErrorReporter with RunnableMethod.
// This is okay since the ExtensionErrorReporter is a singleton that lives until
@@ -62,21 +56,9 @@ void ExtensionErrorReporter::ReportError(const std::string& message,
LOG(ERROR) << "Extension error: " << message;
if (enable_noisy_errors_ && be_noisy) {
-#if defined(OS_WIN)
- win_util::MessageBox(NULL, UTF8ToWide(message), L"Extension error",
- MB_OK | MB_SETFOREGROUND);
-#elif defined(OS_MACOSX)
- // There must be a better way to do this, for all platforms.
- scoped_cftyperef<CFStringRef> message_cf(
- base::SysUTF8ToCFStringRef(message));
- CFOptionFlags response;
- CFUserNotificationDisplayAlert(
- 0, kCFUserNotificationCautionAlertLevel, NULL, NULL, NULL,
- CFSTR("Extension error"), message_cf,
- NULL, NULL, NULL, &response);
-#else
- // TODO(port)
-#endif
+ platform_util::SimpleErrorBox(NULL,
+ UTF8ToUTF16("Extension error"),
+ UTF8ToUTF16(message));
}
}