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

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

Issue 1231733006: Revert of [Password Generation] Always save generated passwords (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_;
166 password_manager_->SetHasGeneratedPasswordForForm(driver_, form_, true); 165 password_manager_->SetHasGeneratedPasswordForForm(driver_, form_, true);
167 Hide(); 166 Hide();
168 } 167 }
169 168
170 int PasswordGenerationPopupControllerImpl::GetMinimumWidth() { 169 int PasswordGenerationPopupControllerImpl::GetMinimumWidth() {
171 // Minimum width in pixels. 170 // Minimum width in pixels.
172 const int minimum_width = 350; 171 const int minimum_width = 350;
173 172
174 // If the width of the field is longer than the minimum, use that instead. 173 // If the width of the field is longer than the minimum, use that instead.
175 return std::max(minimum_width, 174 return std::max(minimum_width,
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 293
295 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() { 294 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() {
296 return help_text_; 295 return help_text_;
297 } 296 }
298 297
299 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() { 298 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() {
300 return link_range_; 299 return link_range_;
301 } 300 }
302 301
303 } // namespace autofill 302 } // 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