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

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

Powered by Google App Engine
This is Rietveld 408576698