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

Side by Side Diff: components/autofill/core/browser/payments/payments_client.cc

Issue 1548663002: Change the name of Payments RPC endpoint in log statement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/command_line.h" 7 #include "base/command_line.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/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 std::string GetRequestContentType() override { return "application/json"; } 233 std::string GetRequestContentType() override { return "application/json"; }
234 234
235 std::string GetRequestContent() override { 235 std::string GetRequestContent() override {
236 base::DictionaryValue request_dict; 236 base::DictionaryValue request_dict;
237 scoped_ptr<base::DictionaryValue> context(new base::DictionaryValue()); 237 scoped_ptr<base::DictionaryValue> context(new base::DictionaryValue());
238 context->SetString("language_code", app_locale_); 238 context->SetString("language_code", app_locale_);
239 request_dict.Set("context", context.Pass()); 239 request_dict.Set("context", context.Pass());
240 240
241 std::string request_content; 241 std::string request_content;
242 base::JSONWriter::Write(request_dict, &request_content); 242 base::JSONWriter::Write(request_dict, &request_content);
243 VLOG(3) << "getsavecarddetails request body: " << request_content; 243 VLOG(3) << "getdetailsforsavecard request body: " << request_content;
244 return request_content; 244 return request_content;
245 } 245 }
246 246
247 void ParseResponse(scoped_ptr<base::DictionaryValue> response) override { 247 void ParseResponse(scoped_ptr<base::DictionaryValue> response) override {
248 response->GetString("context_token", &context_token_); 248 response->GetString("context_token", &context_token_);
249 base::DictionaryValue* unowned_legal_message; 249 base::DictionaryValue* unowned_legal_message;
250 if (response->GetDictionary("legal_message", &unowned_legal_message)) 250 if (response->GetDictionary("legal_message", &unowned_legal_message))
251 legal_message_ = unowned_legal_message->CreateDeepCopy(); 251 legal_message_ = unowned_legal_message->CreateDeepCopy();
252 } 252 }
253 253
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 531
532 void PaymentsClient::SetOAuth2TokenAndStartRequest() { 532 void PaymentsClient::SetOAuth2TokenAndStartRequest() {
533 url_fetcher_->AddExtraRequestHeader(net::HttpRequestHeaders::kAuthorization + 533 url_fetcher_->AddExtraRequestHeader(net::HttpRequestHeaders::kAuthorization +
534 std::string(": Bearer ") + access_token_); 534 std::string(": Bearer ") + access_token_);
535 535
536 url_fetcher_->Start(); 536 url_fetcher_->Start();
537 } 537 }
538 538
539 } // namespace payments 539 } // namespace payments
540 } // namespace autofill 540 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698