|
|
Created:
6 years, 8 months ago by vabr (Chromium) Modified:
6 years, 8 months ago Reviewers:
Ilya Sherman CC:
chromium-reviews, benquan, jam, browser-components-watch_chromium.org, darin-cc_chromium.org, Dane Wallinga, dyu1, estade+watch_chromium.org, Ilya Sherman, rouslan+autofillwatch_chromium.org Base URL:
svn://svn.chromium.org/chrome/trunk/src Visibility:
Public. |
DescriptionFix style in PasswordManager and PasswordAutofillAgent .cc files
This CL contains only style-related clean-up.
The purpose is to allow other CLs (like https://codereview.chromium.org/231283003/) make whole-file clang-format without inducing many unrelated changes.
Putting Ilya in TBR, because of https://codereview.chromium.org/231283003/diff/200001/components/autofill/content/renderer/password_autofill_agent.cc#newcode280
TBR=isherman@chromium.org
BUG=347927
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266318
Patch Set 1 #Patch Set 2 : Just rebased #
Messages
Total messages: 15 (0 generated)
The CQ bit was checked by vabr@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vabr@chromium.org/254573005/1
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
The CQ bit was checked by isherman@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vabr@chromium.org/254573005/1
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for components/autofill/content/renderer/password_autofill_agent.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file components/autofill/content/renderer/password_autofill_agent.cc Hunk #5 FAILED at 358. Hunk #6 succeeded at 465 (offset 8 lines). Hunk #7 succeeded at 567 (offset 8 lines). Hunk #8 succeeded at 576 (offset 8 lines). Hunk #9 succeeded at 644 (offset 8 lines). Hunk #10 succeeded at 663 (offset 8 lines). Hunk #11 succeeded at 673 (offset 8 lines). Hunk #12 succeeded at 714 (offset 8 lines). Hunk #13 succeeded at 746 (offset 8 lines). Hunk #14 succeeded at 765 (offset 8 lines). Hunk #15 succeeded at 774 (offset 8 lines). Hunk #16 succeeded at 788 (offset 8 lines). Hunk #17 succeeded at 860 (offset 8 lines). 1 out of 17 hunks FAILED -- saving rejects to file components/autofill/content/renderer/password_autofill_agent.cc.rej Patch: components/autofill/content/renderer/password_autofill_agent.cc Index: components/autofill/content/renderer/password_autofill_agent.cc diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc index e2714226c66f8bd9963fbdeef86d245fae659c66..0806e06fdaa771b042cb253ea3bf6f2f2fd6a38f 100644 --- a/components/autofill/content/renderer/password_autofill_agent.cc +++ b/components/autofill/content/renderer/password_autofill_agent.cc @@ -39,8 +39,7 @@ namespace { static const size_t kMaximumTextSizeForAutocomplete = 1000; // Maps element names to the actual elements to simplify form filling. -typedef std::map<base::string16, blink::WebInputElement> - FormInputElementMap; +typedef std::map<base::string16, blink::WebInputElement> FormInputElementMap; // Utility struct for form lookup and autofill. When we parse the DOM to look up // a form, in addition to action and origin URL's we have to compare all @@ -213,12 +212,15 @@ PasswordAutofillAgent::PasswordAutofillAgent(content::RenderView* render_view) weak_ptr_factory_(this) { } -PasswordAutofillAgent::~PasswordAutofillAgent() {} +PasswordAutofillAgent::~PasswordAutofillAgent() { +} PasswordAutofillAgent::PasswordValueGatekeeper::PasswordValueGatekeeper() - : was_user_gesture_seen_(false) {} + : was_user_gesture_seen_(false) { +} -PasswordAutofillAgent::PasswordValueGatekeeper::~PasswordValueGatekeeper() {} +PasswordAutofillAgent::PasswordValueGatekeeper::~PasswordValueGatekeeper() { +} void PasswordAutofillAgent::PasswordValueGatekeeper::RegisterElement( blink::WebInputElement* element) { @@ -258,8 +260,7 @@ bool PasswordAutofillAgent::TextFieldDidEndEditing( if (iter == login_to_password_info_.end()) return false; - const PasswordFormFillData& fill_data = - iter->second.fill_data; + const PasswordFormFillData& fill_data = iter->second.fill_data; // If wait_for_username is false, we should have filled when the text changed. if (!fill_data.wait_for_username) @@ -273,7 +274,9 @@ bool PasswordAutofillAgent::TextFieldDidEndEditing( // Do not set selection when ending an editing session, otherwise it can // mess with focus. - FillUserNameAndPassword(&username, &password, fill_data, + FillUserNameAndPassword(&username, + &password, + fill_data, true /* exact_username_match */, false /* set_selection */); return true; @@ -355,7 +358,8 @@ bool PasswordAutofillAgent::DidAcceptAutofillSuggestion( // Set the incoming |username| in the text field and |FillUserNameAndPassword| // will do the rest. input.setValue(username, true); - return FillUserNameAndPassword(&input, &password.password_field, + return FillUserNameAndPassword(&input, + &password.password_field, password.fill_data, true /* exact_username_match */, true /* set_selection */); @@ -454,7 +458,8 @@ bool PasswordAutofillAgent::OnMessageReceived(const IPC::Message& message) { void PasswordAutofillAgent::DidStartLoading() { if (usernames_usage_ != NOTHING_TO_AUTOFILL) { UMA_HISTOGRAM_ENUMERATION("PasswordManager.OtherPossibleUsernamesUsage", - usernames_usage_, OTHER_POSSIBLE_USERNAMES_MAX); + usernames_usage_, + OTHER_POSSIBLE_USERNAMES_MAX); usernames_usage_ = NOTHING_TO_AUTOFILL; } } @@ -555,8 +560,7 @@ void PasswordAutofillAgent::DidStartProvisionalLoad( // If onsubmit has been called, try and save that form. if (provisionally_saved_forms_[form_frame].get()) { Send(new AutofillHostMsg_PasswordFormSubmitted( - routing_id(), - *provisionally_saved_forms_[form_frame])); + routing_id(), *provisionally_saved_forms_[form_frame])); provisionally_saved_forms_.erase(form_frame); } else { // Loop through the forms on the page looking for one that has been @@ -565,15 +569,14 @@ void PasswordAutofillAgent::DidStartProvisionalLoad( frame->document().forms(forms); for (size_t i = 0; i < forms.size(); ++i) { - blink::WebFormElement form_element= forms[i]; + blink::WebFormElement form_element = forms[i]; scoped_ptr<PasswordForm> password_form( CreatePasswordForm(form_element)); - if (password_form.get() && - !password_form->username_value.empty() && + if (password_form.get() && !password_form->username_value.empty() && !password_form->password_value.empty() && !PasswordValueIsDefault(*password_form, form_element)) { - Send(new AutofillHostMsg_PasswordFormSubmitted( - routing_id(), *password_form)); + Send(new AutofillHostMsg_PasswordFormSubmitted(routing_id(), + *password_form)); } } } @@ -634,9 +637,7 @@ void PasswordAutofillAgent::OnFillPasswordForm( FindFormAndFieldForFormControlElement( username_element, &form, &field, REQUIRE_NONE); Send(new AutofillHostMsg_AddPasswordFormMapping( - routing_id(), - field, - form_data)); + routing_id(), field, form_data)); } } @@ -655,7 +656,8 @@ void PasswordAutofillAgent::GetSuggestions( for (PasswordFormFillData::LoginCollection::const_iterator iter = fill_data.additional_logins.begin(); - iter != fill_data.additional_logins.end(); ++iter) { + iter != fill_data.additional_logins.end(); + ++iter) { if (StartsWith(iter->first, input, false)) { suggestions->push_back(iter->first); realms->push_back(base::UTF8ToUTF16(iter->second.realm)); @@ -664,7 +666,8 @@ void PasswordAutofillAgent::GetSuggestions( for (PasswordFormFillData::UsernamesCollection::const_iterator iter = fill_data.other_possible_usernames.begin(); - iter != fill_data.other_possible_usernames.end(); ++iter) { + iter != fill_data.other_possible_usernames.end(); + ++iter) { for (size_t i = 0; i < iter->second.size(); ++i) { if (StartsWith(iter->second[i], input, false)) { usernames_usage_ = OTHER_POSSIBLE_USERNAME_SHOWN; @@ -704,11 +707,8 @@ bool PasswordAutofillAgent::ShowSuggestionPopup( bounding_box.y() * scale, bounding_box.width() * scale, bounding_box.height() * scale); - Send(new AutofillHostMsg_ShowPasswordSuggestions(routing_id(), - field, - bounding_box_scaled, - suggestions, - realms)); + Send(new AutofillHostMsg_ShowPasswordSuggestions( + routing_id(), field, bounding_box_scaled, suggestions, realms)); return !suggestions.empty(); } @@ -739,7 +739,9 @@ void PasswordAutofillAgent::FillFormOnPasswordRecieved( // Fill if we have an exact match for the username. Note that this sets // username to autofilled. - FillUserNameAndPassword(&username_element, &password_element, fill_data, + FillUserNameAndPassword(&username_element, + &password_element, + fill_data, true /* exact_username_match */, false /* set_selection */); } @@ -756,7 +758,8 @@ bool PasswordAutofillAgent::FillUserNameAndPassword( base::string16 password; // Look for any suitable matches to current field text. - if (DoUsernamesMatch(fill_data.basic_data.fields[0].value, current_username, + if (DoUsernamesMatch(fill_data.basic_data.fields[0].value, + current_username, exact_username_match)) { username = fill_data.basic_data.fields[0].value; password = fill_data.basic_data.fields[1].value; @@ -764,9 +767,10 @@ bool PasswordAutofillAgent::FillUserNameAndPassword( // Scan additional logins for a match. PasswordFormFillData::LoginCollection::const_iterator iter; for (iter = fill_data.additional_logins.begin(); - iter != fill_data.additional_logins.end(); ++iter) { - if (DoUsernamesMatch(iter->first, current_username, - exact_username_match)) { + iter != fill_data.additional_logins.end(); + ++iter) { + if (DoUsernamesMatch( + iter->first, current_username, exact_username_match)) { username = iter->first; password = iter->second.password; break; @@ -777,10 +781,11 @@ bool PasswordAutofillAgent::FillUserNameAndPassword( if (username… (message too large)
The CQ bit was checked by vabr@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vabr@chromium.org/254573005/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: tryserver.chromium on mac_chromium_rel
The CQ bit was checked by vabr@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vabr@chromium.org/254573005/20001
Message was sent while issue was closed.
Change committed as 266318 |