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

Side by Side Diff: components/autofill/core/browser/form_structure.cc

Issue 2110663002: components: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase+one fix Created 4 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
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/core/browser/form_structure.h" 5 #include "components/autofill/core/browser/form_structure.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 AutofillQueryContents* query) { 425 AutofillQueryContents* query) {
426 DCHECK(encoded_signatures); 426 DCHECK(encoded_signatures);
427 encoded_signatures->clear(); 427 encoded_signatures->clear();
428 encoded_signatures->reserve(forms.size()); 428 encoded_signatures->reserve(forms.size());
429 429
430 query->set_client_version(kClientVersion); 430 query->set_client_version(kClientVersion);
431 431
432 // Some badly formatted web sites repeat forms - detect that and encode only 432 // Some badly formatted web sites repeat forms - detect that and encode only
433 // one form as returned data would be the same for all the repeated forms. 433 // one form as returned data would be the same for all the repeated forms.
434 std::set<std::string> processed_forms; 434 std::set<std::string> processed_forms;
435 for (const auto& form : forms) { 435 for (const auto* form : forms) {
436 std::string signature(form->FormSignature()); 436 std::string signature(form->FormSignature());
437 if (processed_forms.find(signature) != processed_forms.end()) 437 if (processed_forms.find(signature) != processed_forms.end())
438 continue; 438 continue;
439 processed_forms.insert(signature); 439 processed_forms.insert(signature);
440 if (form->IsMalformed()) 440 if (form->IsMalformed())
441 continue; 441 continue;
442 442
443 form->EncodeFormForQuery(query->add_form()); 443 form->EncodeFormForQuery(query->add_form());
444 444
445 encoded_signatures->push_back(signature); 445 encoded_signatures->push_back(signature);
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
1349 filtered_strings[0].at(prefix_len)) { 1349 filtered_strings[0].at(prefix_len)) {
1350 // Mismatch found. 1350 // Mismatch found.
1351 return filtered_strings[i].substr(0, prefix_len); 1351 return filtered_strings[i].substr(0, prefix_len);
1352 } 1352 }
1353 } 1353 }
1354 } 1354 }
1355 return filtered_strings[0]; 1355 return filtered_strings[0];
1356 } 1356 }
1357 1357
1358 } // namespace autofill 1358 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_profile.cc ('k') | components/autofill/core/browser/personal_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698