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

Side by Side Diff: chrome/browser/ui/gtk/crypto_module_password_dialog.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, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/crypto_module_password_dialog.h" 5 #include "chrome/browser/ui/crypto_module_password_dialog.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/crypto/crypto_module_blocking_password_delegate.h" 10 #include "base/crypto/crypto_module_blocking_password_delegate.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 int response_id) { 190 int response_id) {
191 if (response_id == GTK_RESPONSE_ACCEPT) 191 if (response_id == GTK_RESPONSE_ACCEPT)
192 callback_->Run(gtk_entry_get_text(GTK_ENTRY(password_entry_))); 192 callback_->Run(gtk_entry_get_text(GTK_ENTRY(password_entry_)));
193 else 193 else
194 callback_->Run(static_cast<const char*>(NULL)); 194 callback_->Run(static_cast<const char*>(NULL));
195 195
196 // This will cause gtk to zero out the buffer. (see 196 // This will cause gtk to zero out the buffer. (see
197 // gtk_entry_buffer_normal_delete_text: 197 // gtk_entry_buffer_normal_delete_text:
198 // http://git.gnome.org/browse/gtk+/tree/gtk/gtkentrybuffer.c#n187) 198 // http://git.gnome.org/browse/gtk+/tree/gtk/gtkentrybuffer.c#n187)
199 gtk_editable_delete_text(GTK_EDITABLE(password_entry_), 0, -1); 199 gtk_editable_delete_text(GTK_EDITABLE(password_entry_), 0, -1);
200 gtk_widget_destroy(GTK_WIDGET(dialog_)); 200 gtk_widget_destroy(dialog_);
201 } 201 }
202 202
203 void CryptoModulePasswordDialog::OnWindowDestroy(GtkWidget* widget) { 203 void CryptoModulePasswordDialog::OnWindowDestroy(GtkWidget* widget) {
204 delete this; 204 delete this;
205 } 205 }
206 206
207 } // namespace 207 } // namespace
208 208
209 // Every post-task we do blocks, so there's no need to ref-count. 209 // Every post-task we do blocks, so there's no need to ref-count.
210 DISABLE_RUNNABLE_METHOD_REFCOUNT(CryptoModuleBlockingDialogDelegate); 210 DISABLE_RUNNABLE_METHOD_REFCOUNT(CryptoModuleBlockingDialogDelegate);
(...skipping 10 matching lines...) Expand all
221 } 221 }
222 222
223 base::CryptoModuleBlockingPasswordDelegate* 223 base::CryptoModuleBlockingPasswordDelegate*
224 NewCryptoModuleBlockingDialogDelegate( 224 NewCryptoModuleBlockingDialogDelegate(
225 CryptoModulePasswordReason reason, 225 CryptoModulePasswordReason reason,
226 const std::string& server) { 226 const std::string& server) {
227 return new CryptoModuleBlockingDialogDelegate(reason, server); 227 return new CryptoModuleBlockingDialogDelegate(reason, server);
228 } 228 }
229 229
230 } // namespace browser 230 } // namespace browser
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698