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

Unified Diff: chrome/browser/ui/views/password_generation_bubble_view.h

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: Some changes based on the code review. 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/ui/views/password_generation_bubble_view.h
diff --git a/chrome/browser/ui/views/password_generation_bubble_view.h b/chrome/browser/ui/views/password_generation_bubble_view.h
index bce9aff6da6c6b192748f5f6917bd898f4e85287..8a992a4faa175d25a236b7f9936c16a299dac9aa 100644
--- a/chrome/browser/ui/views/password_generation_bubble_view.h
+++ b/chrome/browser/ui/views/password_generation_bubble_view.h
@@ -6,12 +6,16 @@
#define CHROME_BROWSER_UI_VIEWS_PASSWORD_GENERATION_BUBBLE_VIEW_H_
#pragma once
-#include "chrome/browser/autofill/password_generator.h"
+#include "base/basictypes.h"
#include "ui/gfx/rect.h"
#include "ui/views/bubble/bubble_delegate.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/view.h"
+namespace autofill {
+class PasswordGenerator;
+}
+
namespace content {
class RenderViewHost;
}
@@ -28,9 +32,11 @@ class Textfield;
class PasswordGenerationBubbleView : public views::BubbleDelegateView,
public views::ButtonListener {
public:
- PasswordGenerationBubbleView(const gfx::Rect& anchor_rect,
- views::View* anchor_view,
- content::RenderViewHost* render_view_host);
+ PasswordGenerationBubbleView(
+ const gfx::Rect& anchor_rect,
+ views::View* anchor_view,
+ content::RenderViewHost* render_view_host,
+ const autofill::PasswordGenerator& password_generator);
virtual ~PasswordGenerationBubbleView();
private:
@@ -52,8 +58,8 @@ class PasswordGenerationBubbleView : public views::BubbleDelegateView,
// RenderViewHost associated with the button that spawned this bubble.
content::RenderViewHost* render_view_host_;
- // Class to generate passwords
- autofill::PasswordGenerator password_generator_;
+ // Object to generate passwords
+ const autofill::PasswordGenerator& password_generator_;
DISALLOW_COPY_AND_ASSIGN(PasswordGenerationBubbleView);
};

Powered by Google App Engine
This is Rietveld 408576698