| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 EXTENSIONS_BROWSER_EXTENSION_ERROR_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_ERROR_H_ |
| 6 #define EXTENSIONS_BROWSER_EXTENSION_ERROR_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_ERROR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 class RuntimeError : public ExtensionError { | 121 class RuntimeError : public ExtensionError { |
| 122 public: | 122 public: |
| 123 RuntimeError(bool from_incognito, | 123 RuntimeError(bool from_incognito, |
| 124 const base::string16& source, | 124 const base::string16& source, |
| 125 const base::string16& message, | 125 const base::string16& message, |
| 126 const StackTrace& stack_trace, | 126 const StackTrace& stack_trace, |
| 127 const GURL& context_url, | 127 const GURL& context_url, |
| 128 logging::LogSeverity level); | 128 logging::LogSeverity level); |
| 129 virtual ~RuntimeError(); | 129 virtual ~RuntimeError(); |
| 130 | 130 |
| 131 virtual scoped_ptr<base::DictionaryValue> ToValue() const OVERRIDE; |
| 132 |
| 131 virtual std::string PrintForTest() const OVERRIDE; | 133 virtual std::string PrintForTest() const OVERRIDE; |
| 132 | 134 |
| 133 const GURL& context_url() const { return context_url_; } | 135 const GURL& context_url() const { return context_url_; } |
| 134 const StackTrace& stack_trace() const { return stack_trace_; } | 136 const StackTrace& stack_trace() const { return stack_trace_; } |
| 137 |
| 138 // Keys used for retrieving JSON values. |
| 139 static const char kColumnNumberKey[]; |
| 140 static const char kContextUrlKey[]; |
| 141 static const char kFunctionNameKey[]; |
| 142 static const char kLineNumberKey[]; |
| 143 static const char kStackTraceKey[]; |
| 144 static const char kUrlKey[]; |
| 145 |
| 135 private: | 146 private: |
| 136 virtual bool IsEqualImpl(const ExtensionError* rhs) const OVERRIDE; | 147 virtual bool IsEqualImpl(const ExtensionError* rhs) const OVERRIDE; |
| 137 | 148 |
| 138 // Since we piggy-back onto other error reporting systems (like V8 and | 149 // Since we piggy-back onto other error reporting systems (like V8 and |
| 139 // WebKit), the reported information may need to be cleaned up in order to be | 150 // WebKit), the reported information may need to be cleaned up in order to be |
| 140 // in a consistent format. | 151 // in a consistent format. |
| 141 void CleanUpInit(); | 152 void CleanUpInit(); |
| 142 | 153 |
| 143 GURL context_url_; | 154 GURL context_url_; |
| 144 StackTrace stack_trace_; | 155 StackTrace stack_trace_; |
| 145 | 156 |
| 146 DISALLOW_COPY_AND_ASSIGN(RuntimeError); | 157 DISALLOW_COPY_AND_ASSIGN(RuntimeError); |
| 147 }; | 158 }; |
| 148 | 159 |
| 149 } // namespace extensions | 160 } // namespace extensions |
| 150 | 161 |
| 151 #endif // EXTENSIONS_BROWSER_EXTENSION_ERROR_H_ | 162 #endif // EXTENSIONS_BROWSER_EXTENSION_ERROR_H_ |
| OLD | NEW |