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

Unified Diff: chrome/browser/extensions/extension_error_reporter.h

Issue 2806613002: Check IME state in ImeController (Closed)
Patch Set: Postpone message box until profile is initialized Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
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..8a1d7f82ad9c5b219bd9a008606a53a01049d952 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 is initialized. If there are any postponed alert
+ // boxes, they will be shown at this point.
+ void OnProfileInitialized();
+
// 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 profile_initialized_ = false;
base::ObserverList<Observer> observers_;
};

Powered by Google App Engine
This is Rietveld 408576698