OLD | NEW |
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/content/browser/wallet/wallet_client.h" | 5 #include "components/autofill/content/browser/wallet/wallet_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 request_dict.SetString(kRiskParamsKey, delegate_->GetRiskData()); | 364 request_dict.SetString(kRiskParamsKey, delegate_->GetRiskData()); |
365 request_dict.SetString(kMerchantDomainKey, | 365 request_dict.SetString(kMerchantDomainKey, |
366 source_url_.GetWithEmptyPath().spec()); | 366 source_url_.GetWithEmptyPath().spec()); |
367 request_dict.SetBoolean(kUseMinimalAddresses, false); | 367 request_dict.SetBoolean(kUseMinimalAddresses, false); |
368 request_dict.SetBoolean(kPhoneNumberRequired, true); | 368 request_dict.SetBoolean(kPhoneNumberRequired, true); |
369 | 369 |
370 std::string primary_account_number; | 370 std::string primary_account_number; |
371 std::string card_verification_number; | 371 std::string card_verification_number; |
372 if (instrument) { | 372 if (instrument) { |
373 primary_account_number = net::EscapeUrlEncodedData( | 373 primary_account_number = net::EscapeUrlEncodedData( |
374 UTF16ToUTF8(instrument->primary_account_number()), true); | 374 base::UTF16ToUTF8(instrument->primary_account_number()), true); |
375 card_verification_number = net::EscapeUrlEncodedData( | 375 card_verification_number = net::EscapeUrlEncodedData( |
376 UTF16ToUTF8(instrument->card_verification_number()), true); | 376 base::UTF16ToUTF8(instrument->card_verification_number()), true); |
377 | 377 |
378 if (!reference_instrument) { | 378 if (!reference_instrument) { |
379 request_dict.Set(kInstrumentKey, instrument->ToDictionary().release()); | 379 request_dict.Set(kInstrumentKey, instrument->ToDictionary().release()); |
380 request_dict.SetString(kInstrumentPhoneNumberKey, | 380 request_dict.SetString(kInstrumentPhoneNumberKey, |
381 instrument->address()->phone_number()); | 381 instrument->address()->phone_number()); |
382 } else { | 382 } else { |
383 DCHECK(!reference_instrument->object_id().empty()); | 383 DCHECK(!reference_instrument->object_id().empty()); |
384 | 384 |
385 int new_month = instrument->expiration_month(); | 385 int new_month = instrument->expiration_month(); |
386 int new_year = instrument->expiration_year(); | 386 int new_year = instrument->expiration_year(); |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 NOTREACHED(); | 805 NOTREACHED(); |
806 return AutofillMetrics::UNKNOWN_API_CALL; | 806 return AutofillMetrics::UNKNOWN_API_CALL; |
807 } | 807 } |
808 | 808 |
809 NOTREACHED(); | 809 NOTREACHED(); |
810 return AutofillMetrics::UNKNOWN_API_CALL; | 810 return AutofillMetrics::UNKNOWN_API_CALL; |
811 } | 811 } |
812 | 812 |
813 } // namespace wallet | 813 } // namespace wallet |
814 } // namespace autofill | 814 } // namespace autofill |
OLD | NEW |