OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 CHROME_COMMON_EXTENSIONS_ERROR_REPORTER_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_ERROR_REPORTER_H_ |
6 #define CHROME_COMMON_EXTENSIONS_ERROR_REPORTER_H_ | 6 #define CHROME_COMMON_EXTENSIONS_ERROR_REPORTER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/message_loop.h" | 11 class MessageLoop; |
12 | 12 |
13 // Exposes an easy way for the various components of the extension system to | 13 // Exposes an easy way for the various components of the extension system to |
14 // report errors. This is a singleton that lives on the UI thread, with the | 14 // report errors. This is a singleton that lives on the UI thread, with the |
15 // exception of ReportError() which may be called from any thread. | 15 // exception of ReportError() which may be called from any thread. |
16 // TODO(aa): Hook this up to about:extensions, when we have about:extensions. | 16 // TODO(aa): Hook this up to about:extensions, when we have about:extensions. |
17 // TODO(aa): Consider exposing directly, or via a helper, to the renderer | 17 // TODO(aa): Consider exposing directly, or via a helper, to the renderer |
18 // process and plumbing the errors out to the browser. | 18 // process and plumbing the errors out to the browser. |
19 // TODO(aa): Add ReportError(extension_id, message, be_noisy), so that we can | 19 // TODO(aa): Add ReportError(extension_id, message, be_noisy), so that we can |
20 // report errors that are specific to a particular extension. | 20 // report errors that are specific to a particular extension. |
21 class ExtensionErrorReporter { | 21 class ExtensionErrorReporter { |
(...skipping 19 matching lines...) Expand all Loading... |
41 static ExtensionErrorReporter* instance_; | 41 static ExtensionErrorReporter* instance_; |
42 | 42 |
43 ExtensionErrorReporter(bool enable_noisy_errors); | 43 ExtensionErrorReporter(bool enable_noisy_errors); |
44 | 44 |
45 MessageLoop* ui_loop_; | 45 MessageLoop* ui_loop_; |
46 std::vector<std::string> errors_; | 46 std::vector<std::string> errors_; |
47 bool enable_noisy_errors_; | 47 bool enable_noisy_errors_; |
48 }; | 48 }; |
49 | 49 |
50 #endif // CHROME_COMMON_EXTENSIONS_ERROR_REPORTER_H_ | 50 #endif // CHROME_COMMON_EXTENSIONS_ERROR_REPORTER_H_ |
OLD | NEW |