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

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

Issue 1040083003: [Password Manager] Fix to resolve DCHECK when seeing '\n' character in a saved credential username. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/autofill_popup_controller_impl.h" 5 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 if (selected_line != kNoSelection) { 457 if (selected_line != kNoSelection) {
458 InvalidateRow(selected_line); 458 InvalidateRow(selected_line);
459 459
460 if (!CanAccept(suggestions_[selected_line].frontend_id)) 460 if (!CanAccept(suggestions_[selected_line].frontend_id))
461 selected_line = kNoSelection; 461 selected_line = kNoSelection;
462 } 462 }
463 463
464 selected_line_ = selected_line; 464 selected_line_ = selected_line;
465 465
466 if (selected_line_ != kNoSelection) { 466 if (selected_line_ != kNoSelection) {
467 delegate_->DidSelectSuggestion(elided_values_[selected_line_], 467 delegate_->DidSelectSuggestion(suggestions_[selected_line_].value,
468 suggestions_[selected_line_].frontend_id); 468 suggestions_[selected_line_].frontend_id);
469 } else { 469 } else {
470 delegate_->ClearPreviewedForm(); 470 delegate_->ClearPreviewedForm();
471 } 471 }
472 } 472 }
473 473
474 void AutofillPopupControllerImpl::SelectNextLine() { 474 void AutofillPopupControllerImpl::SelectNextLine() {
475 int new_selected_line = selected_line_ + 1; 475 int new_selected_line = selected_line_ + 1;
476 476
477 // Skip over any lines that can't be selected. 477 // Skip over any lines that can't be selected.
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 popup_bounds_ = gfx::Rect(); 657 popup_bounds_ = gfx::Rect();
658 658
659 suggestions_.clear(); 659 suggestions_.clear();
660 elided_values_.clear(); 660 elided_values_.clear();
661 elided_labels_.clear(); 661 elided_labels_.clear();
662 662
663 selected_line_ = kNoSelection; 663 selected_line_ = kNoSelection;
664 } 664 }
665 665
666 } // namespace autofill 666 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698