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

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

Issue 1213803006: [Password Generation] Always save generated passwords (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 5 years, 5 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
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/ui/autofill/password_generation_popup_controller_impl.h " 5 #include "chrome/browser/ui/autofill/password_generation_popup_controller_impl.h "
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 password_selected_ = selected; 155 password_selected_ = selected;
156 view_->PasswordSelectionUpdated(); 156 view_->PasswordSelectionUpdated();
157 view_->UpdateBoundsAndRedrawPopup(); 157 view_->UpdateBoundsAndRedrawPopup();
158 } 158 }
159 159
160 void PasswordGenerationPopupControllerImpl::PasswordAccepted() { 160 void PasswordGenerationPopupControllerImpl::PasswordAccepted() {
161 if (!display_password_) 161 if (!display_password_)
162 return; 162 return;
163 163
164 driver_->GeneratedPasswordAccepted(current_password_); 164 driver_->GeneratedPasswordAccepted(current_password_);
165 form_.new_password_value = current_password_;
165 password_manager_->SetHasGeneratedPasswordForForm(driver_, form_, true); 166 password_manager_->SetHasGeneratedPasswordForForm(driver_, form_, true);
166 Hide(); 167 Hide();
167 } 168 }
168 169
169 int PasswordGenerationPopupControllerImpl::GetMinimumWidth() { 170 int PasswordGenerationPopupControllerImpl::GetMinimumWidth() {
170 // Minimum width in pixels. 171 // Minimum width in pixels.
171 const int minimum_width = 350; 172 const int minimum_width = 350;
172 173
173 // If the width of the field is longer than the minimum, use that instead. 174 // If the width of the field is longer than the minimum, use that instead.
174 return std::max(minimum_width, 175 return std::max(minimum_width,
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 294
294 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() { 295 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() {
295 return help_text_; 296 return help_text_;
296 } 297 }
297 298
298 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() { 299 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() {
299 return link_range_; 300 return link_range_;
300 } 301 }
301 302
302 } // namespace autofill 303 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698