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

Side by Side Diff: components/autofill/core/browser/payments/payments_request.h

Issue 1859453002: components/autofill: scoped_ptr -> unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 4 years, 8 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 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_PAYMENTS_REQUEST_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_PAYMENTS_REQUEST_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_PAYMENTS_REQUEST_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_PAYMENTS_REQUEST_H_
7 7
8 #include <memory>
9
8 namespace autofill { 10 namespace autofill {
9 11
10 class AutofillClient; 12 class AutofillClient;
11 13
12 namespace payments { 14 namespace payments {
13 15
14 class PaymentsClientDelegate; 16 class PaymentsClientDelegate;
15 17
16 // Interface for the various Payments request types. 18 // Interface for the various Payments request types.
17 class PaymentsRequest { 19 class PaymentsRequest {
18 public: 20 public:
19 virtual ~PaymentsRequest() {} 21 virtual ~PaymentsRequest() {}
20 22
21 // Returns the URL path for this type of request. 23 // Returns the URL path for this type of request.
22 virtual std::string GetRequestUrlPath() = 0; 24 virtual std::string GetRequestUrlPath() = 0;
23 25
24 // Returns the content type that should be used in the HTTP request. 26 // Returns the content type that should be used in the HTTP request.
25 virtual std::string GetRequestContentType() = 0; 27 virtual std::string GetRequestContentType() = 0;
26 28
27 // Returns the content that should be provided in the HTTP request. 29 // Returns the content that should be provided in the HTTP request.
28 virtual std::string GetRequestContent() = 0; 30 virtual std::string GetRequestContent() = 0;
29 31
30 // Parses the required elements of the HTTP response. 32 // Parses the required elements of the HTTP response.
31 virtual void ParseResponse(scoped_ptr<base::DictionaryValue> response) = 0; 33 virtual void ParseResponse(
34 std::unique_ptr<base::DictionaryValue> response) = 0;
32 35
33 // Returns true if all of the required elements were successfully retrieved by 36 // Returns true if all of the required elements were successfully retrieved by
34 // a call to ParseResponse. 37 // a call to ParseResponse.
35 virtual bool IsResponseComplete() = 0; 38 virtual bool IsResponseComplete() = 0;
36 39
37 // Invokes the appropriate callback in the delegate based on what type of 40 // Invokes the appropriate callback in the delegate based on what type of
38 // request this is. 41 // request this is.
39 virtual void RespondToDelegate(PaymentsClientDelegate* delegate, 42 virtual void RespondToDelegate(PaymentsClientDelegate* delegate,
40 AutofillClient::PaymentsRpcResult result) = 0; 43 AutofillClient::PaymentsRpcResult result) = 0;
41 }; 44 };
42 45
43 } // namespace payments 46 } // namespace payments
44 } // namespace autofill 47 } // namespace autofill
45 48
46 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_PAYMENTS_REQUEST_H_ 49 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_PAYMENTS_REQUEST_H_
OLDNEW
« no previous file with comments | « components/autofill/core/browser/payments/payments_client.cc ('k') | components/autofill/core/browser/personal_data_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698