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

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

Issue 10458018: This CL does the following: (1) Pass the max_length attribute to the password generator; (2) Update… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix a windows UI bug. Created 8 years, 6 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/password_generation_bubble_gtk.cc
diff --git a/chrome/browser/ui/gtk/password_generation_bubble_gtk.cc b/chrome/browser/ui/gtk/password_generation_bubble_gtk.cc
index b1a1a1e29858687bd98b168276fc598c62e2670d..5ad26b84692d7c614fd815b7d8736095896c5662 100644
--- a/chrome/browser/ui/gtk/password_generation_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/password_generation_bubble_gtk.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/gtk/password_generation_bubble_gtk.h"
#include "base/utf_string_conversions.h"
+#include "chrome/browser/autofill/password_generator.h"
#include "chrome/browser/password_manager/password_manager.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
@@ -29,10 +30,12 @@ PasswordGenerationBubbleGtk::PasswordGenerationBubbleGtk(
GtkWidget* anchor_widget,
Profile* profile,
content::RenderViewHost* render_view_host,
+ autofill::PasswordGenerator* password_generator,
PasswordManager* password_manager)
: profile_(profile),
form_(form),
render_view_host_(render_view_host),
+ password_generator_(password_generator),
password_manager_(password_manager) {
// TODO(gcasto): Localize text after we have finalized the UI.
// crbug.com/118062
@@ -53,7 +56,7 @@ PasswordGenerationBubbleGtk::PasswordGenerationBubbleGtk(
GtkWidget* password_line = gtk_hbox_new(FALSE, kHorizontalSpacing);
text_field_ = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(text_field_),
- password_generator_.Generate().c_str());
+ password_generator_->Generate().c_str());
gtk_entry_set_max_length(GTK_ENTRY(text_field_), 15);
GtkWidget* accept_button = gtk_button_new_with_label("Try It");
gtk_box_pack_start(GTK_BOX(password_line), text_field_, TRUE, TRUE, 0);
« no previous file with comments | « chrome/browser/ui/gtk/password_generation_bubble_gtk.h ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698