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

Issue 2611253004: [Payment Request] Change the lifetime management of PaymentRequestImpl (Closed)

Created:
3 years, 11 months ago by Mathieu
Modified:
3 years, 11 months ago
CC:
chromium-reviews, droger+watchlist_chromium.org, tfarina, sdefresne+watchlist_chromium.org, gogerald+paymentswatch_chromium.org, rouslan+payments_chromium.org, blundell+watchlist_chromium.org, sebsg+paymentswatch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Payment Request] Change the lifetime management of PaymentRequestImpl Was previously 1 PaymentRequestImpl per WebContents. Now there is a PaymentRequestWebContentsManager (1 per WebContents) that owns all the PaymentRequestImpl's, whose raw pointers are shared with the delegate and the mojo bindings. Also, moving PaymentRequestImpl from chrome/ to components/ which creates the need for a PaymentRequestDelegate (initially managing the Chrome dialog). BUG=678302 Review-Url: https://codereview.chromium.org/2611253004 Cr-Commit-Position: refs/heads/master@{#442335} Committed: https://chromium.googlesource.com/chromium/src/+/f709499d132d767ce77caf04134cd231160835ac

Patch Set 1 #

Patch Set 2 : clean up #

Patch Set 3 : added a browser test #

Total comments: 36

Patch Set 4 : deps fix #

Patch Set 5 : addressed comments #

Total comments: 11

Patch Set 6 : fix ios dependency #

Total comments: 2

Patch Set 7 : added TODO #

Total comments: 2

Patch Set 8 : PaymentRequestImpl -> PaymentRequest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+495 lines, -237 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 5 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 chunks +8 lines, -4 lines 0 comments Download
A chrome/browser/payments/chrome_payment_request_delegate.h View 1 2 3 4 5 6 7 1 chunk +28 lines, -0 lines 0 comments Download
A chrome/browser/payments/chrome_payment_request_delegate.cc View 1 2 3 4 5 6 7 1 chunk +16 lines, -0 lines 0 comments Download
A chrome/browser/payments/payment_request_factory.h View 1 2 3 4 5 6 7 1 chunk +26 lines, -0 lines 0 comments Download
A chrome/browser/payments/payment_request_factory.cc View 1 2 3 4 5 6 7 1 chunk +28 lines, -0 lines 0 comments Download
D chrome/browser/payments/payment_request_impl.h View 1 1 chunk +0 lines, -59 lines 0 comments Download
D chrome/browser/payments/payment_request_impl.cc View 1 1 chunk +0 lines, -96 lines 0 comments Download
A chrome/browser/payments/payment_request_web_contents_manager_browsertest.cc View 1 2 3 4 5 6 7 1 chunk +74 lines, -0 lines 0 comments Download
M chrome/browser/payments/site_per_process_payments_browsertest.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/BUILD.gn View 1 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_dialogs.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/payments/order_summary_view_controller.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/payments/order_summary_view_controller.cc View 1 2 3 4 5 6 7 3 chunks +9 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_dialog.h View 1 2 3 4 5 6 7 3 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_dialog.cc View 1 2 3 4 5 6 7 6 chunks +17 lines, -19 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_sheet_controller.h View 1 2 3 4 5 6 7 3 chunks +9 lines, -10 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_sheet_view_controller.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_sheet_view_controller.cc View 1 2 3 4 5 6 7 3 chunks +9 lines, -9 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 2 chunks +9 lines, -1 line 0 comments Download
A chrome/test/data/payment_request_multiple_requests.html View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M components/payments/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +22 lines, -0 lines 0 comments Download
M components/payments/DEPS View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
A + components/payments/payment_request.h View 1 2 3 4 5 6 7 3 chunks +17 lines, -14 lines 0 comments Download
A components/payments/payment_request.cc View 1 2 3 4 5 6 7 1 chunk +59 lines, -0 lines 0 comments Download
A components/payments/payment_request_delegate.h View 1 2 3 4 5 6 7 1 chunk +22 lines, -0 lines 0 comments Download
A components/payments/payment_request_web_contents_manager.h View 1 2 3 4 5 6 7 1 chunk +61 lines, -0 lines 0 comments Download
A components/payments/payment_request_web_contents_manager.cc View 1 2 3 4 5 6 7 1 chunk +45 lines, -0 lines 0 comments Download

Messages

Total messages: 46 (32 generated)
Mathieu
Hi Rouslan, PTAL. Future CLs will tackle browser tests more (moving html files from android ...
3 years, 11 months ago (2017-01-06 21:17:54 UTC) #7
please use gerrit instead
Excellent stuff! https://codereview.chromium.org/2611253004/diff/40001/chrome/browser/payments/chrome_payment_request_delegate.cc File chrome/browser/payments/chrome_payment_request_delegate.cc (right): https://codereview.chromium.org/2611253004/diff/40001/chrome/browser/payments/chrome_payment_request_delegate.cc#newcode1 chrome/browser/payments/chrome_payment_request_delegate.cc:1: // Copyright 2016 The Chromium Authors. All ...
3 years, 11 months ago (2017-01-06 21:49:10 UTC) #16
Mathieu
PTAL https://codereview.chromium.org/2611253004/diff/40001/chrome/browser/payments/chrome_payment_request_delegate.cc File chrome/browser/payments/chrome_payment_request_delegate.cc (right): https://codereview.chromium.org/2611253004/diff/40001/chrome/browser/payments/chrome_payment_request_delegate.cc#newcode1 chrome/browser/payments/chrome_payment_request_delegate.cc:1: // Copyright 2016 The Chromium Authors. All rights ...
3 years, 11 months ago (2017-01-07 05:03:08 UTC) #19
please use gerrit instead
LGTM % comments https://codereview.chromium.org/2611253004/diff/80001/chrome/browser/payments/chrome_payment_request_delegate.h File chrome/browser/payments/chrome_payment_request_delegate.h (right): https://codereview.chromium.org/2611253004/diff/80001/chrome/browser/payments/chrome_payment_request_delegate.h#newcode17 chrome/browser/payments/chrome_payment_request_delegate.h:17: }; Need to override the destructor ...
3 years, 11 months ago (2017-01-09 14:50:13 UTC) #22
sdefresne
https://codereview.chromium.org/2611253004/diff/80001/components/payments/BUILD.gn File components/payments/BUILD.gn (right): https://codereview.chromium.org/2611253004/diff/80001/components/payments/BUILD.gn#newcode39 components/payments/BUILD.gn:39: "//content/public/browser", If components/payments/BUILD.gn is loaded on iOS then you'll ...
3 years, 11 months ago (2017-01-09 16:38:47 UTC) #24
Mathieu
Thanks Sylvain! Implemented the fix and filed a bug for the layered component. +avi for ...
3 years, 11 months ago (2017-01-09 16:54:20 UTC) #28
Avi (use Gerrit)
LGTM for the dependency though have the appropriate love for our iOS peeps.
3 years, 11 months ago (2017-01-09 17:20:14 UTC) #30
sdefresne
lgtm https://codereview.chromium.org/2611253004/diff/100001/components/payments/DEPS File components/payments/DEPS (right): https://codereview.chromium.org/2611253004/diff/100001/components/payments/DEPS#newcode2 components/payments/DEPS:2: "+content/public/browser", Please add a TODO to move this ...
3 years, 11 months ago (2017-01-09 17:35:39 UTC) #32
Mathieu
Thanks https://codereview.chromium.org/2611253004/diff/100001/components/payments/DEPS File components/payments/DEPS (right): https://codereview.chromium.org/2611253004/diff/100001/components/payments/DEPS#newcode2 components/payments/DEPS:2: "+content/public/browser", On 2017/01/09 17:35:39, sdefresne wrote: > Please ...
3 years, 11 months ago (2017-01-09 17:43:35 UTC) #33
sky
mojo dep LGTM https://codereview.chromium.org/2611253004/diff/120001/components/payments/payment_request_impl.h File components/payments/payment_request_impl.h (right): https://codereview.chromium.org/2611253004/diff/120001/components/payments/payment_request_impl.h#newcode22 components/payments/payment_request_impl.h:22: class PaymentRequestImpl : payments::mojom::PaymentRequest { One ...
3 years, 11 months ago (2017-01-09 18:55:32 UTC) #34
Mathieu
Thanks! https://codereview.chromium.org/2611253004/diff/120001/components/payments/payment_request_impl.h File components/payments/payment_request_impl.h (right): https://codereview.chromium.org/2611253004/diff/120001/components/payments/payment_request_impl.h#newcode22 components/payments/payment_request_impl.h:22: class PaymentRequestImpl : payments::mojom::PaymentRequest { On 2017/01/09 18:55:32, ...
3 years, 11 months ago (2017-01-09 19:17:42 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2611253004/140001
3 years, 11 months ago (2017-01-09 19:18:43 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2611253004/160001
3 years, 11 months ago (2017-01-09 19:22:21 UTC) #43
commit-bot: I haz the power
3 years, 11 months ago (2017-01-09 20:49:10 UTC) #46
Message was sent while issue was closed.
Committed patchset #8 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/f709499d132d767ce77caf04134c...

Powered by Google App Engine
This is Rietveld 408576698