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

Unified Diff: chrome/browser/ui/gtk/external_protocol_dialog_gtk.cc

Issue 6627038: gtk: Rename OnDialogResponse() to OnResponse() to standardize on a consistent naming scheme. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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/ui/gtk/external_protocol_dialog_gtk.cc
diff --git a/chrome/browser/ui/gtk/external_protocol_dialog_gtk.cc b/chrome/browser/ui/gtk/external_protocol_dialog_gtk.cc
index 5e38060f63acdc6b1ee5d6f55236af6e4e66d392..a52eba1314ce72c9ba5d87fd230f360fc22aef87 100644
--- a/chrome/browser/ui/gtk/external_protocol_dialog_gtk.cc
+++ b/chrome/browser/ui/gtk/external_protocol_dialog_gtk.cc
@@ -98,20 +98,21 @@ ExternalProtocolDialogGtk::ExternalProtocolDialogGtk(const GURL& url)
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog_)->vbox), vbox,
FALSE, FALSE, 0);
- g_signal_connect(dialog_, "response",
- G_CALLBACK(OnDialogResponseThunk), this);
+ g_signal_connect(dialog_, "response", G_CALLBACK(OnResponseThunk), this);
gtk_window_set_resizable(GTK_WINDOW(dialog_), FALSE);
gtk_widget_show_all(dialog_);
}
-void ExternalProtocolDialogGtk::OnDialogResponse(GtkWidget* widget,
- int response) {
+ExternalProtocolDialogGtk::~ExternalProtocolDialogGtk() {
+}
+
+void ExternalProtocolDialogGtk::OnResponse(GtkWidget* dialog, int response_id) {
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbox_))) {
- if (response == GTK_RESPONSE_ACCEPT) {
+ if (response_id == GTK_RESPONSE_ACCEPT) {
ExternalProtocolHandler::SetBlockState(
url_.scheme(), ExternalProtocolHandler::DONT_BLOCK);
- } else if (response == GTK_RESPONSE_REJECT) {
+ } else if (response_id == GTK_RESPONSE_REJECT) {
ExternalProtocolHandler::SetBlockState(
url_.scheme(), ExternalProtocolHandler::BLOCK);
}
@@ -119,7 +120,7 @@ void ExternalProtocolDialogGtk::OnDialogResponse(GtkWidget* widget,
// the dialog, do nothing.
}
- if (response == GTK_RESPONSE_ACCEPT) {
+ if (response_id == GTK_RESPONSE_ACCEPT) {
UMA_HISTOGRAM_LONG_TIMES("clickjacking.launch_url",
base::TimeTicks::Now() - creation_time_);

Powered by Google App Engine
This is Rietveld 408576698