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

Unified Diff: chrome/browser/autofill/autofill_manager.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 bug. Created 8 years, 7 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/autofill/autofill_manager.cc
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 146c42923b90c724f4d569dc38f407cb45adf0ce..ceb325b0f383473a29fc75644f8d5b7c65d675ab 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -28,6 +28,7 @@
#include "chrome/browser/autofill/autofill_type.h"
#include "chrome/browser/autofill/credit_card.h"
#include "chrome/browser/autofill/form_structure.h"
+#include "chrome/browser/autofill/password_generator.h"
#include "chrome/browser/autofill/personal_data_manager.h"
#include "chrome/browser/autofill/personal_data_manager_factory.h"
#include "chrome/browser/autofill/phone_number.h"
@@ -717,13 +718,17 @@ void AutofillManager::OnHideAutofillPopup() {
external_delegate_->HideAutofillPopup();
}
-void AutofillManager::OnShowPasswordGenerationPopup(const gfx::Rect& bounds) {
+void AutofillManager::OnShowPasswordGenerationPopup(const gfx::Rect& bounds,
+ int max_length) {
#if defined(OS_ANDROID)
NOTIMPLEMENTED();
#else
Browser* browser = browser::FindLastActiveWithProfile(
Profile::FromBrowserContext(web_contents()->GetBrowserContext()));
- browser->window()->ShowPasswordGenerationBubble(bounds);
+ scoped_ptr<autofill::PasswordGenerator> password_generator(
+ new autofill::PasswordGenerator(max_length));
Ilya Sherman 2012/06/04 21:17:52 This will be freed as soon as the method call retu
zysxqn 2012/06/04 22:40:15 Originally I did mean to transfer the ownership --
+ browser->window()->ShowPasswordGenerationBubble(
+ bounds, password_generator.get());
#endif // #if defined(OS_ANDROID)
}

Powered by Google App Engine
This is Rietveld 408576698