Chromium Code Reviews| Index: chrome/browser/extensions/extension_error_reporter.h |
| diff --git a/chrome/browser/extensions/extension_error_reporter.h b/chrome/browser/extensions/extension_error_reporter.h |
| index ffb280f152f2fbfa7b9cfd0b6d60c8511027226f..717e1054254d99dcd2e465b4011bcce34a63e6a7 100644 |
| --- a/chrome/browser/extensions/extension_error_reporter.h |
| +++ b/chrome/browser/extensions/extension_error_reporter.h |
| @@ -59,9 +59,14 @@ class ExtensionErrorReporter { |
| bool be_noisy); |
| // Report an error. Errors always go to VLOG(1). Optionally, they can also |
| - // cause a noisy alert box. |
| + // cause a noisy alert box. Showing the alert box will be postponed until |
| + // profile initialization is finished. |
| void ReportError(const base::string16& message, bool be_noisy); |
| + // Called after the profile of the active user is initialized. If there are |
| + // any postponed alert boxes, they will be shown at this point. |
| + void ShowPostponedMessages(); |
| + |
| // Get the errors that have been reported so far. |
| const std::vector<base::string16>* GetErrors(); |
| @@ -80,7 +85,9 @@ class ExtensionErrorReporter { |
| scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; |
| std::vector<base::string16> errors_; |
| + std::vector<base::string16> postponed_messages_; |
| bool enable_noisy_errors_; |
| + bool should_postpone_messages_ = true; |
|
xiyuan
2017/04/24 18:21:51
Think ExtensionErrorReporter code also runs for de
xiyuan
2017/04/25 22:31:27
This would essentially disable extension error rep
|
| base::ObserverList<Observer> observers_; |
| }; |