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

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

Issue 83083002: Code cleanup: Pass vector by const-ref rather than by value. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « components/autofill/core/browser/personal_data_manager.h ('k') | 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/core/browser/personal_data_manager.h" 5 #include "components/autofill/core/browser/personal_data_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <iterator> 9 #include <iterator>
10 10
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 557
558 void PersonalDataManager::Refresh() { 558 void PersonalDataManager::Refresh() {
559 LoadProfiles(); 559 LoadProfiles();
560 LoadCreditCards(); 560 LoadCreditCards();
561 } 561 }
562 562
563 void PersonalDataManager::GetProfileSuggestions( 563 void PersonalDataManager::GetProfileSuggestions(
564 const AutofillType& type, 564 const AutofillType& type,
565 const base::string16& field_contents, 565 const base::string16& field_contents,
566 bool field_is_autofilled, 566 bool field_is_autofilled,
567 std::vector<ServerFieldType> other_field_types, 567 const std::vector<ServerFieldType>& other_field_types,
568 std::vector<base::string16>* values, 568 std::vector<base::string16>* values,
569 std::vector<base::string16>* labels, 569 std::vector<base::string16>* labels,
570 std::vector<base::string16>* icons, 570 std::vector<base::string16>* icons,
571 std::vector<GUIDPair>* guid_pairs) { 571 std::vector<GUIDPair>* guid_pairs) {
572 values->clear(); 572 values->clear();
573 labels->clear(); 573 labels->clear();
574 icons->clear(); 574 icons->clear();
575 guid_pairs->clear(); 575 guid_pairs->clear();
576 576
577 const std::vector<AutofillProfile*>& profiles = GetProfiles(); 577 const std::vector<AutofillProfile*>& profiles = GetProfiles();
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 if (!votes.empty()) { 1030 if (!votes.empty()) {
1031 std::map<std::string, int>::iterator iter = 1031 std::map<std::string, int>::iterator iter =
1032 std::max_element(votes.begin(), votes.end(), CompareVotes); 1032 std::max_element(votes.begin(), votes.end(), CompareVotes);
1033 return iter->first; 1033 return iter->first;
1034 } 1034 }
1035 1035
1036 return std::string(); 1036 return std::string();
1037 } 1037 }
1038 1038
1039 } // namespace autofill 1039 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/personal_data_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698