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

Unified Diff: chrome/browser/safe_browsing/srt_chrome_prompt_impl.cc

Issue 2834613003: Adds error handling support for the SwReporter launcher. (Closed)
Patch Set: Code review 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/safe_browsing/srt_chrome_prompt_impl.cc
diff --git a/chrome/browser/safe_browsing/srt_chrome_prompt_impl.cc b/chrome/browser/safe_browsing/srt_chrome_prompt_impl.cc
index 38bb6015efc851f563ca2bece0c69110a7fda174..bf052da5421842d46e3a77f03ce83480db85e82e 100644
--- a/chrome/browser/safe_browsing/srt_chrome_prompt_impl.cc
+++ b/chrome/browser/safe_browsing/srt_chrome_prompt_impl.cc
@@ -15,7 +15,10 @@ using chrome_cleaner::mojom::PromptAcceptance;
using chrome_cleaner::mojom::UwSPtr;
ChromePromptImpl::ChromePromptImpl(ChromePromptRequest request)
- : binding_(this, std::move(request)) {}
+ : binding_(this, std::move(request)) {
+ binding_.set_connection_error_handler(base::Bind(
+ &ChromePromptImpl::OnConnectionClosed, base::RetainedRef(this)));
+}
ChromePromptImpl::~ChromePromptImpl() {}
@@ -28,4 +31,15 @@ void ChromePromptImpl::PromptUser(
callback.Run(PromptAcceptance::DENIED);
}
+void ChromePromptImpl::OnConnectionClosed() {
+ // Placeholder. This should handle cases when the reporter process is
+ // disconnected (e.g. due to a crash) and the prompt dialog is being shown
+ // to the user.
+}
+
+void ChromePromptImpl::OnConnectionError(const std::string& message) {
+ // Placeholder. This should handle cases when the reporter process sends
+ // a bad message and the prompt dialog is being shown to the user.
+}
+
} // namespace safe_browsing

Powered by Google App Engine
This is Rietveld 408576698