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

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

Issue 183853011: Move TrimWhitespace to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | 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 "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" 5 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // These outparams are required because |card|/|profile| accept different types 219 // These outparams are required because |card|/|profile| accept different types
220 // of raw info, and CreditCard doesn't save CVCs. 220 // of raw info, and CreditCard doesn't save CVCs.
221 void GetBillingInfoFromOutputs(const FieldValueMap& output, 221 void GetBillingInfoFromOutputs(const FieldValueMap& output,
222 CreditCard* card, 222 CreditCard* card,
223 base::string16* cvc, 223 base::string16* cvc,
224 AutofillProfile* profile) { 224 AutofillProfile* profile) {
225 for (FieldValueMap::const_iterator it = output.begin(); 225 for (FieldValueMap::const_iterator it = output.begin();
226 it != output.end(); ++it) { 226 it != output.end(); ++it) {
227 const ServerFieldType type = it->first; 227 const ServerFieldType type = it->first;
228 base::string16 trimmed; 228 base::string16 trimmed;
229 TrimWhitespace(it->second, TRIM_ALL, &trimmed); 229 base::TrimWhitespace(it->second, base::TRIM_ALL, &trimmed);
230 230
231 // Special case CVC as CreditCard just swallows it. 231 // Special case CVC as CreditCard just swallows it.
232 if (type == CREDIT_CARD_VERIFICATION_CODE) { 232 if (type == CREDIT_CARD_VERIFICATION_CODE) {
233 if (cvc) 233 if (cvc)
234 cvc->assign(trimmed); 234 cvc->assign(trimmed);
235 } else if (type == ADDRESS_HOME_COUNTRY || 235 } else if (type == ADDRESS_HOME_COUNTRY ||
236 type == ADDRESS_BILLING_COUNTRY) { 236 type == ADDRESS_BILLING_COUNTRY) {
237 if (profile) { 237 if (profile) {
238 profile->SetInfo(AutofillType(type), 238 profile->SetInfo(AutofillType(type),
239 trimmed, 239 trimmed,
(...skipping 3628 matching lines...) Expand 10 before | Expand all | Expand 10 after
3868 view_->UpdateButtonStrip(); 3868 view_->UpdateButtonStrip();
3869 } 3869 }
3870 3870
3871 void AutofillDialogControllerImpl::FetchWalletCookie() { 3871 void AutofillDialogControllerImpl::FetchWalletCookie() {
3872 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); 3872 net::URLRequestContextGetter* request_context = profile_->GetRequestContext();
3873 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); 3873 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context));
3874 signin_helper_->StartWalletCookieValueFetch(); 3874 signin_helper_->StartWalletCookieValueFetch();
3875 } 3875 }
3876 3876
3877 } // namespace autofill 3877 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698