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

Side by Side Diff: chrome/browser/ui/autofill/password_generation_popup_controller_impl.h

Issue 2937033002: [Password Generation] Send a boolean flag of whether user changed generated password (Closed)
Patch Set: UMA fix Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_CONTROLLER_IMPL_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_CONTROLLER_IMPL_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_CONTROLLER_IMPL_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_CONTROLLER_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 void Show(bool display_password); 69 void Show(bool display_password);
70 70
71 // Hides the popup and destroys |this|. 71 // Hides the popup and destroys |this|.
72 void HideAndDestroy(); 72 void HideAndDestroy();
73 73
74 protected: 74 protected:
75 PasswordGenerationPopupControllerImpl( 75 PasswordGenerationPopupControllerImpl(
76 const gfx::RectF& bounds, 76 const gfx::RectF& bounds,
77 const PasswordForm& form, 77 const PasswordForm& form,
78 int max_length, 78 int max_length,
79 password_manager::PasswordManager* password_manager,
80 password_manager::PasswordManagerDriver* driver, 79 password_manager::PasswordManagerDriver* driver,
81 PasswordGenerationPopupObserver* observer, 80 PasswordGenerationPopupObserver* observer,
82 content::WebContents* web_contents, 81 content::WebContents* web_contents,
83 gfx::NativeView container_view); 82 gfx::NativeView container_view);
84 83
85 // Handle to the popup. May be NULL if popup isn't showing. 84 // Handle to the popup. May be NULL if popup isn't showing.
86 PasswordGenerationPopupView* view_; 85 PasswordGenerationPopupView* view_;
87 86
88 private: 87 private:
89 // PasswordGenerationPopupController implementation: 88 // PasswordGenerationPopupController implementation:
(...skipping 30 matching lines...) Expand all
120 void PasswordSelected(bool selected); 119 void PasswordSelected(bool selected);
121 120
122 // Accept password if it's selected. 121 // Accept password if it's selected.
123 bool PossiblyAcceptPassword(); 122 bool PossiblyAcceptPassword();
124 123
125 // Get desired size of popup. Height depends on width because we do text 124 // Get desired size of popup. Height depends on width because we do text
126 // wrapping. 125 // wrapping.
127 void CalculateBounds(); 126 void CalculateBounds();
128 127
129 PasswordForm form_; 128 PasswordForm form_;
130 password_manager::PasswordManager* password_manager_;
vabr (Chromium) 2017/06/16 12:32:29 While I applaud to removing dead code, perhaps thi
kolos1 2017/06/21 13:46:12 This code became dead because of removing the call
vabr (Chromium) 2017/06/21 14:18:33 You are right, sorry that I missed that.
131 password_manager::PasswordManagerDriver* driver_; 129 password_manager::PasswordManagerDriver* driver_;
132 130
133 // May be NULL. 131 // May be NULL.
134 PasswordGenerationPopupObserver* observer_; 132 PasswordGenerationPopupObserver* observer_;
135 133
136 // Controls how passwords are generated. 134 // Controls how passwords are generated.
137 std::unique_ptr<PasswordGenerator> generator_; 135 std::unique_ptr<PasswordGenerator> generator_;
138 136
139 // Contains common popup data. 137 // Contains common popup data.
140 const PopupControllerCommon controller_common_; 138 const PopupControllerCommon controller_common_;
(...skipping 17 matching lines...) Expand all
158 content::WebContents* const web_contents_; 156 content::WebContents* const web_contents_;
159 157
160 base::WeakPtrFactory<PasswordGenerationPopupControllerImpl> weak_ptr_factory_; 158 base::WeakPtrFactory<PasswordGenerationPopupControllerImpl> weak_ptr_factory_;
161 159
162 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationPopupControllerImpl); 160 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationPopupControllerImpl);
163 }; 161 };
164 162
165 } // namespace autofill 163 } // namespace autofill
166 164
167 #endif // CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_CONTROLLER_IMPL_ H_ 165 #endif // CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_CONTROLLER_IMPL_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698