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

Side by Side Diff: chrome/browser/ui/autofill/data_model_wrapper.cc

Issue 1223153003: Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows Created 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/autofill/data_model_wrapper.h" 5 #include "chrome/browser/ui/autofill/data_model_wrapper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 // Email and phone number aren't part of address formatting. 73 // Email and phone number aren't part of address formatting.
74 base::string16 non_address_info; 74 base::string16 non_address_info;
75 base::string16 email = GetInfoForDisplay(AutofillType(EMAIL_ADDRESS)); 75 base::string16 email = GetInfoForDisplay(AutofillType(EMAIL_ADDRESS));
76 if (!email.empty()) 76 if (!email.empty())
77 non_address_info += base::ASCIIToUTF16("\n") + email; 77 non_address_info += base::ASCIIToUTF16("\n") + email;
78 78
79 non_address_info += base::ASCIIToUTF16("\n") + phone; 79 non_address_info += base::ASCIIToUTF16("\n") + phone;
80 80
81 *vertically_compact = base::UTF8ToUTF16(single_line) + non_address_info; 81 *vertically_compact = base::UTF8ToUTF16(single_line) + non_address_info;
82 *horizontally_compact = base::UTF8ToUTF16(JoinString(lines, "\n")) + 82 *horizontally_compact = base::UTF8ToUTF16(base::JoinString(lines, "\n")) +
83 non_address_info; 83 non_address_info;
84 84
85 return true; 85 return true;
86 } 86 }
87 87
88 bool DataModelWrapper::FillFormStructure( 88 bool DataModelWrapper::FillFormStructure(
89 const std::vector<ServerFieldType>& types, 89 const std::vector<ServerFieldType>& types,
90 const FormStructure::InputFieldComparator& compare, 90 const FormStructure::InputFieldComparator& compare,
91 FormStructure* form_structure) const { 91 FormStructure* form_structure) const {
92 return form_structure->FillFields( 92 return form_structure->FillFields(
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 } 375 }
376 376
377 return base::UTF8ToUTF16(address_->GetFieldValue(field)); 377 return base::UTF8ToUTF16(address_->GetFieldValue(field));
378 } 378 }
379 379
380 const std::string& I18nAddressDataWrapper::GetLanguageCode() const { 380 const std::string& I18nAddressDataWrapper::GetLanguageCode() const {
381 return address_->language_code; 381 return address_->language_code;
382 } 382 }
383 383
384 } // namespace autofill 384 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_types.cc ('k') | chrome/browser/ui/cocoa/global_error_bubble_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698