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

Side by Side Diff: extensions/browser/extension_error.h

Issue 23624002: Add UI for RuntimeErrors in the ErrorConsole (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dc_ec_merge
Patch Set: Created 7 years, 3 months 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 unified diff | Download patch
OLDNEW
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698