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

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

Issue 102843002: Move RemoveChars, ReplaceChars, TrimString, and TruncateUTF8ToByteSize to base namespace. (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
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/autofill_profile.h" 5 #include "components/autofill/core/browser/autofill_profile.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <map> 9 #include <map>
10 #include <ostream> 10 #include <ostream>
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 label.append(separator); 664 label.append(separator);
665 665
666 label.append(field); 666 label.append(field);
667 ++num_fields_used; 667 ++num_fields_used;
668 } 668 }
669 669
670 // Flatten the label if need be. 670 // Flatten the label if need be.
671 const char16 kNewline[] = { '\n', 0 }; 671 const char16 kNewline[] = { '\n', 0 };
672 const base::string16 newline_separator = 672 const base::string16 newline_separator =
673 l10n_util::GetStringUTF16(IDS_AUTOFILL_ADDRESS_LINE_SEPARATOR); 673 l10n_util::GetStringUTF16(IDS_AUTOFILL_ADDRESS_LINE_SEPARATOR);
674 ReplaceChars(label, kNewline, newline_separator, &label); 674 base::ReplaceChars(label, kNewline, newline_separator, &label);
675 675
676 return label; 676 return label;
677 } 677 }
678 678
679 // static 679 // static
680 void AutofillProfile::CreateInferredLabelsHelper( 680 void AutofillProfile::CreateInferredLabelsHelper(
681 const std::vector<AutofillProfile*>& profiles, 681 const std::vector<AutofillProfile*>& profiles,
682 const std::list<size_t>& indices, 682 const std::list<size_t>& indices,
683 const std::vector<ServerFieldType>& fields, 683 const std::vector<ServerFieldType>& fields,
684 size_t num_fields_to_include, 684 size_t num_fields_to_include,
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_STATE)) 823 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_STATE))
824 << " " 824 << " "
825 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_ZIP)) 825 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_ZIP))
826 << " " 826 << " "
827 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_COUNTRY)) 827 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_COUNTRY))
828 << " " 828 << " "
829 << UTF16ToUTF8(MultiString(profile, PHONE_HOME_WHOLE_NUMBER)); 829 << UTF16ToUTF8(MultiString(profile, PHONE_HOME_WHOLE_NUMBER));
830 } 830 }
831 831
832 } // namespace autofill 832 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698