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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2639893002: Clean up unneeded JavaScript dialog parameter. (Closed)
Patch Set: rebase Created 3 years, 11 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: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index aa9fbc0bcc86a95f72e76dae88efd37d8dfeca5f..69a82e80b803aeb627ecfcf4d7ffe47d512d6888 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -514,10 +514,7 @@ WebContentsImpl::~WebContentsImpl() {
// Clear out any JavaScript state.
if (dialog_manager_) {
- // This object is being destructed, so make sure that no callbacks happen.
- dialog_manager_->CancelDialogs(this,
- true, // suppress_callbacks,
- true); // reset_state
+ dialog_manager_->CancelDialogs(this, /*reset_state=*/true);
}
if (color_chooser_info_.get())
@@ -898,9 +895,7 @@ RenderViewHostImpl* WebContentsImpl::GetRenderViewHost() const {
void WebContentsImpl::CancelActiveAndPendingDialogs() {
if (dialog_manager_) {
- dialog_manager_->CancelDialogs(this,
- false, // suppress_callbacks,
- false); // reset_state
+ dialog_manager_->CancelDialogs(this, /*reset_state=*/false);
}
if (browser_plugin_embedder_)
browser_plugin_embedder_->CancelGuestDialogs();
@@ -3470,9 +3465,7 @@ void WebContentsImpl::DidNavigateAnyFramePostCommit(
// If this is a user-initiated navigation, start allowing JavaScript dialogs
// again.
if (params.gesture == NavigationGestureUser && dialog_manager_) {
- dialog_manager_->CancelDialogs(this,
- false, // suppress_callbacks,
- true); // reset_state
+ dialog_manager_->CancelDialogs(this, /*reset_state=*/true);
}
// Notify observers about navigation.
@@ -4942,9 +4935,7 @@ void WebContentsImpl::CancelModalDialogsForRenderManager() {
// cross-process navigation will either destroy the browser plugins or not
// require their dialogs to close.
if (dialog_manager_) {
- dialog_manager_->CancelDialogs(this,
- false, // suppress_callbacks,
- true); // reset_state
+ dialog_manager_->CancelDialogs(this, /*reset_state=*/true);
}
}

Powered by Google App Engine
This is Rietveld 408576698