| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/payments/payments_client.h" | 5 #include "components/autofill/core/browser/payments/payments_client.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 SetStringIfNotEmpty(profile, PHONE_HOME_WHOLE_NUMBER, app_locale, | 169 SetStringIfNotEmpty(profile, PHONE_HOME_WHOLE_NUMBER, app_locale, |
| 170 "phone_number", address.get()); | 170 "phone_number", address.get()); |
| 171 | 171 |
| 172 return address; | 172 return address; |
| 173 } | 173 } |
| 174 | 174 |
| 175 class UnmaskCardRequest : public PaymentsRequest { | 175 class UnmaskCardRequest : public PaymentsRequest { |
| 176 public: | 176 public: |
| 177 UnmaskCardRequest(const PaymentsClient::UnmaskRequestDetails& request_details) | 177 UnmaskCardRequest(const PaymentsClient::UnmaskRequestDetails& request_details) |
| 178 : request_details_(request_details) { | 178 : request_details_(request_details) { |
| 179 DCHECK_EQ(CreditCard::MASKED_SERVER_CARD, | 179 DCHECK( |
| 180 request_details.card.record_type()); | 180 CreditCard::MASKED_SERVER_CARD == request_details.card.record_type() || |
| 181 CreditCard::FULL_SERVER_CARD == request_details.card.record_type()); |
| 181 } | 182 } |
| 182 ~UnmaskCardRequest() override {} | 183 ~UnmaskCardRequest() override {} |
| 183 | 184 |
| 184 std::string GetRequestUrlPath() override { return kUnmaskCardRequestPath; } | 185 std::string GetRequestUrlPath() override { return kUnmaskCardRequestPath; } |
| 185 | 186 |
| 186 std::string GetRequestContentType() override { | 187 std::string GetRequestContentType() override { |
| 187 return "application/x-www-form-urlencoded"; | 188 return "application/x-www-form-urlencoded"; |
| 188 } | 189 } |
| 189 | 190 |
| 190 std::string GetRequestContent() override { | 191 std::string GetRequestContent() override { |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 | 544 |
| 544 void PaymentsClient::SetOAuth2TokenAndStartRequest() { | 545 void PaymentsClient::SetOAuth2TokenAndStartRequest() { |
| 545 url_fetcher_->AddExtraRequestHeader(net::HttpRequestHeaders::kAuthorization + | 546 url_fetcher_->AddExtraRequestHeader(net::HttpRequestHeaders::kAuthorization + |
| 546 std::string(": Bearer ") + access_token_); | 547 std::string(": Bearer ") + access_token_); |
| 547 | 548 |
| 548 url_fetcher_->Start(); | 549 url_fetcher_->Start(); |
| 549 } | 550 } |
| 550 | 551 |
| 551 } // namespace payments | 552 } // namespace payments |
| 552 } // namespace autofill | 553 } // namespace autofill |
| OLD | NEW |