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

Side by Side Diff: components/autofill/content/renderer/password_autofill_agent.cc

Issue 432863003: Add a DCHECK for NULL frame pointers in PasswordAutofillAgent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unnecessary DCHECK Created 6 years, 4 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 | Annotate | Revision Log
« 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/autofill/content/renderer/password_autofill_agent.h" 5 #include "components/autofill/content/renderer/password_autofill_agent.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 if (!password->suggestedValue().isEmpty()) { 1102 if (!password->suggestedValue().isEmpty()) {
1103 password->setSuggestedValue(blink::WebString()); 1103 password->setSuggestedValue(blink::WebString());
1104 password->setAutofilled(was_password_autofilled_); 1104 password->setAutofilled(was_password_autofilled_);
1105 } 1105 }
1106 } 1106 }
1107 1107
1108 void PasswordAutofillAgent::ProvisionallySavePassword( 1108 void PasswordAutofillAgent::ProvisionallySavePassword(
1109 blink::WebLocalFrame* frame, 1109 blink::WebLocalFrame* frame,
1110 const blink::WebFormElement& form, 1110 const blink::WebFormElement& form,
1111 ProvisionallySaveRestriction restriction) { 1111 ProvisionallySaveRestriction restriction) {
1112 DCHECK(frame);
1112 scoped_ptr<PasswordForm> password_form(CreatePasswordForm(form)); 1113 scoped_ptr<PasswordForm> password_form(CreatePasswordForm(form));
1113 if (!password_form || (restriction == RESTRICTION_NON_EMPTY_PASSWORD && 1114 if (!password_form || (restriction == RESTRICTION_NON_EMPTY_PASSWORD &&
1114 password_form->password_value.empty() && 1115 password_form->password_value.empty() &&
1115 password_form->new_password_value.empty())) { 1116 password_form->new_password_value.empty())) {
1116 return; 1117 return;
1117 } 1118 }
1118 provisionally_saved_forms_[frame].reset(password_form.release()); 1119 provisionally_saved_forms_[frame].reset(password_form.release());
1119 } 1120 }
1120 1121
1121 } // namespace autofill 1122 } // 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