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

Side by Side Diff: chrome/browser/ui/views/payments/test_chrome_payment_request_delegate.cc

Issue 2919263002: Don't move raw pointers in payments (Closed)
Patch Set: Created 3 years, 6 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/views/payments/test_chrome_payment_request_delegate. h" 5 #include "chrome/browser/ui/views/payments/test_chrome_payment_request_delegate. h"
6 6
7 #include <utility>
8
9 #include "content/public/browser/web_contents.h" 7 #include "content/public/browser/web_contents.h"
10 8
11 namespace payments { 9 namespace payments {
12 10
13 TestChromePaymentRequestDelegate::TestChromePaymentRequestDelegate( 11 TestChromePaymentRequestDelegate::TestChromePaymentRequestDelegate(
14 content::WebContents* web_contents, 12 content::WebContents* web_contents,
15 PaymentRequestDialogView::ObserverForTest* observer, 13 PaymentRequestDialogView::ObserverForTest* observer,
16 bool is_incognito, 14 bool is_incognito,
17 bool is_valid_ssl) 15 bool is_valid_ssl)
18 : ChromePaymentRequestDelegate(web_contents), 16 : ChromePaymentRequestDelegate(web_contents),
19 region_data_loader_(nullptr), 17 region_data_loader_(nullptr),
20 observer_(observer), 18 observer_(observer),
21 is_incognito_(is_incognito), 19 is_incognito_(is_incognito),
22 is_valid_ssl_(is_valid_ssl) {} 20 is_valid_ssl_(is_valid_ssl) {}
23 21
24 void TestChromePaymentRequestDelegate::ShowDialog(PaymentRequest* request) { 22 void TestChromePaymentRequestDelegate::ShowDialog(PaymentRequest* request) {
25 PaymentRequestDialogView* dialog_view = 23 PaymentRequestDialogView* dialog_view =
26 new PaymentRequestDialogView(request, observer_); 24 new PaymentRequestDialogView(request, observer_);
27 dialog_view->ShowDialog(); 25 dialog_view->ShowDialog();
Mathieu 2017/06/05 13:17:32 In the strange world of views, ShowWebModalDialogV
28 dialog_ = std::move(dialog_view); 26 dialog_ = dialog_view;
29 } 27 }
30 28
31 bool TestChromePaymentRequestDelegate::IsIncognito() const { 29 bool TestChromePaymentRequestDelegate::IsIncognito() const {
32 return is_incognito_; 30 return is_incognito_;
33 } 31 }
34 32
35 bool TestChromePaymentRequestDelegate::IsSslCertificateValid() { 33 bool TestChromePaymentRequestDelegate::IsSslCertificateValid() {
36 return is_valid_ssl_; 34 return is_valid_ssl_;
37 } 35 }
38 36
39 autofill::RegionDataLoader* 37 autofill::RegionDataLoader*
40 TestChromePaymentRequestDelegate::GetRegionDataLoader() { 38 TestChromePaymentRequestDelegate::GetRegionDataLoader() {
41 if (region_data_loader_) 39 if (region_data_loader_)
42 return region_data_loader_; 40 return region_data_loader_;
43 return ChromePaymentRequestDelegate::GetRegionDataLoader(); 41 return ChromePaymentRequestDelegate::GetRegionDataLoader();
44 } 42 }
45 } // namespace payments 43 } // namespace payments
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