summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/extensions/extension_error_reporter.cc8
-rw-r--r--chrome/browser/extensions/extension_error_reporter.h3
2 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/extensions/extension_error_reporter.cc b/chrome/browser/extensions/extension_error_reporter.cc
index bd923f5..8a17f26 100644
--- a/chrome/browser/extensions/extension_error_reporter.cc
+++ b/chrome/browser/extensions/extension_error_reporter.cc
@@ -10,6 +10,14 @@
#include "chrome/common/win_util.h"
#endif
+// No AddRef required when using ExtensionErrorReporter with RunnableMethod.
+// This is okay since the ExtensionErrorReporter is a singleton that lives until
+// the end of the process.
+template <> struct RunnableMethodTraits<ExtensionErrorReporter> {
+ static void RetainCallee(ExtensionErrorReporter*) {}
+ static void ReleaseCallee(ExtensionErrorReporter*) {}
+};
+
ExtensionErrorReporter* ExtensionErrorReporter::instance_ = NULL;
// static
diff --git a/chrome/browser/extensions/extension_error_reporter.h b/chrome/browser/extensions/extension_error_reporter.h
index 737e276..151edd5 100644
--- a/chrome/browser/extensions/extension_error_reporter.h
+++ b/chrome/browser/extensions/extension_error_reporter.h
@@ -19,8 +19,7 @@
// process and plumbing the errors out to the browser.
// TODO(aa): Add ReportError(extension_id, message, be_noisy), so that we can
// report errors that are specific to a particular extension.
-class ExtensionErrorReporter
- : public base::RefCountedThreadSafe<ExtensionErrorReporter> {
+class ExtensionErrorReporter {
public:
// Initializes the error reporter. Must be called before any other methods
// and on the UI thread.