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

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

Issue 1172753003: Move LowerCaseEqualsASCII to base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util
Patch Set: Created 5 years, 6 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
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_form_conversion_utils.h" 5 #include "components/autofill/content/renderer/password_form_conversion_utils.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 PasswordForm::Layout SequenceToLayout(base::StringPiece layout_sequence) { 93 PasswordForm::Layout SequenceToLayout(base::StringPiece layout_sequence) {
94 if (MatchesLoginAndSignupPattern(layout_sequence)) 94 if (MatchesLoginAndSignupPattern(layout_sequence))
95 return PasswordForm::Layout::LAYOUT_LOGIN_AND_SIGNUP; 95 return PasswordForm::Layout::LAYOUT_LOGIN_AND_SIGNUP;
96 return PasswordForm::Layout::LAYOUT_OTHER; 96 return PasswordForm::Layout::LAYOUT_OTHER;
97 } 97 }
98 98
99 // Checks in a case-insensitive way if the autocomplete attribute for the given 99 // Checks in a case-insensitive way if the autocomplete attribute for the given
100 // |element| is present and has the specified |value_in_lowercase|. 100 // |element| is present and has the specified |value_in_lowercase|.
101 bool HasAutocompleteAttributeValue(const WebInputElement& element, 101 bool HasAutocompleteAttributeValue(const WebInputElement& element,
102 const char* value_in_lowercase) { 102 const char* value_in_lowercase) {
103 return LowerCaseEqualsASCII(element.getAttribute("autocomplete"), 103 return base::LowerCaseEqualsASCII(element.getAttribute("autocomplete"),
104 value_in_lowercase); 104 value_in_lowercase);
105 } 105 }
106 106
107 // Helper to determine which password is the main (current) one, and which is 107 // Helper to determine which password is the main (current) one, and which is
108 // the new password (e.g., on a sign-up or change password form), if any. 108 // the new password (e.g., on a sign-up or change password form), if any.
109 bool LocateSpecificPasswords(std::vector<WebInputElement> passwords, 109 bool LocateSpecificPasswords(std::vector<WebInputElement> passwords,
110 WebInputElement* current_password, 110 WebInputElement* current_password,
111 WebInputElement* new_password) { 111 WebInputElement* new_password) {
112 DCHECK(current_password && current_password->isNull()); 112 DCHECK(current_password && current_password->isNull());
113 DCHECK(new_password && new_password->isNull()); 113 DCHECK(new_password && new_password->isNull());
114 114
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 WebFormElementToFormData(web_form, 486 WebFormElementToFormData(web_form,
487 blink::WebFormControlElement(), 487 blink::WebFormControlElement(),
488 EXTRACT_NONE, 488 EXTRACT_NONE,
489 &password_form->form_data, 489 &password_form->form_data,
490 NULL /* FormFieldData */); 490 NULL /* FormFieldData */);
491 491
492 return password_form.Pass(); 492 return password_form.Pass();
493 } 493 }
494 494
495 } // namespace autofill 495 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/content/renderer/form_autofill_util.cc ('k') | components/autofill/core/browser/contact_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698