|
|
Created:
5 years, 7 months ago by Justin Donnelly Modified:
5 years, 7 months ago Reviewers:
Evan Stade CC:
chromium-reviews, estade+watch_chromium.org, browser-components-watch_chromium.org, rouslan+autofillwatch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionSpecify the use of RiskAdvisoryData for Wallet unmask requests on iOS.
See https://codereview.chromium.org/1058473002/ for background.
BUG=484806
Committed: https://crrev.com/bcd6c7c0db2dea4595b048df3b3fa429481dd80f
Cr-Commit-Position: refs/heads/master@{#330885}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Move ifdef to constructor #Patch Set 3 : Fix initialization #
Total comments: 2
Messages
Total messages: 14 (2 generated)
jdonnelly@chromium.org changed reviewers: + estade@chromium.org
https://codereview.chromium.org/1148123003/diff/1/components/autofill/core/br... File components/autofill/core/browser/ui/card_unmask_prompt_controller_impl.cc (right): https://codereview.chromium.org/1148123003/diff/1/components/autofill/core/br... components/autofill/core/browser/ui/card_unmask_prompt_controller_impl.cc:52: #if defined(OS_IOS) seems like this ifdef could go in the card_unmask_delegate.cc instead (affecting the default constructor)
https://codereview.chromium.org/1148123003/diff/1/components/autofill/core/br... File components/autofill/core/browser/ui/card_unmask_prompt_controller_impl.cc (right): https://codereview.chromium.org/1148123003/diff/1/components/autofill/core/br... components/autofill/core/browser/ui/card_unmask_prompt_controller_impl.cc:52: #if defined(OS_IOS) On 2015/05/20 22:44:46, Evan Stade wrote: > seems like this ifdef could go in the card_unmask_delegate.cc instead (affecting > the default constructor) Done.
https://codereview.chromium.org/1148123003/diff/40001/components/autofill/cor... File components/autofill/core/browser/card_unmask_delegate.h (left): https://codereview.chromium.org/1148123003/diff/40001/components/autofill/cor... components/autofill/core/browser/card_unmask_delegate.h:37: bool providing_risk_advisory_data = false; const bool?
https://codereview.chromium.org/1148123003/diff/40001/components/autofill/cor... File components/autofill/core/browser/card_unmask_delegate.h (left): https://codereview.chromium.org/1148123003/diff/40001/components/autofill/cor... components/autofill/core/browser/card_unmask_delegate.h:37: bool providing_risk_advisory_data = false; On 2015/05/20 23:30:34, Evan Stade wrote: > const bool? Adding const produces the following compile error: ../../components/autofill/core/browser/ui/card_unmask_prompt_controller_impl.cc:51:21: error: object of type 'autofill::CardUnmaskDelegate::UnmaskResponse' cannot be assigned because its copy assignment operator is implicitly deleted pending_response_ = CardUnmaskDelegate::UnmaskResponse(); ^ ../../components/autofill/core/browser/card_unmask_delegate.h:37:16: note: copy assignment operator of 'UnmaskResponse' is implicitly deleted because field 'providing_risk_advisory_data' is of const-qualified type 'const bool' const bool providing_risk_advisory_data; ^
On 2015/05/21 00:29:51, Justin Donnelly wrote: > https://codereview.chromium.org/1148123003/diff/40001/components/autofill/cor... > File components/autofill/core/browser/card_unmask_delegate.h (left): > > https://codereview.chromium.org/1148123003/diff/40001/components/autofill/cor... > components/autofill/core/browser/card_unmask_delegate.h:37: bool > providing_risk_advisory_data = false; > On 2015/05/20 23:30:34, Evan Stade wrote: > > const bool? > > Adding const produces the following compile error: > > ../../components/autofill/core/browser/ui/card_unmask_prompt_controller_impl.cc:51:21: > error: object of type 'autofill::CardUnmaskDelegate::UnmaskResponse' cannot be > assigned because its copy assignment operator is implicitly deleted > pending_response_ = CardUnmaskDelegate::UnmaskResponse(); > ^ > ../../components/autofill/core/browser/card_unmask_delegate.h:37:16: note: copy > assignment operator of 'UnmaskResponse' is implicitly deleted because field > 'providing_risk_advisory_data' is of const-qualified type 'const bool' > const bool providing_risk_advisory_data; > ^ well yes, you have to change how it's initialized (use the initializer list on all platforms)
On 2015/05/21 01:08:12, Evan Stade wrote: > On 2015/05/21 00:29:51, Justin Donnelly wrote: > > > https://codereview.chromium.org/1148123003/diff/40001/components/autofill/cor... > > File components/autofill/core/browser/card_unmask_delegate.h (left): > > > > > https://codereview.chromium.org/1148123003/diff/40001/components/autofill/cor... > > components/autofill/core/browser/card_unmask_delegate.h:37: bool > > providing_risk_advisory_data = false; > > On 2015/05/20 23:30:34, Evan Stade wrote: > > > const bool? > > > > Adding const produces the following compile error: > > > > > ../../components/autofill/core/browser/ui/card_unmask_prompt_controller_impl.cc:51:21: > > error: object of type 'autofill::CardUnmaskDelegate::UnmaskResponse' cannot be > > assigned because its copy assignment operator is implicitly deleted > > pending_response_ = CardUnmaskDelegate::UnmaskResponse(); > > ^ > > ../../components/autofill/core/browser/card_unmask_delegate.h:37:16: note: > copy > > assignment operator of 'UnmaskResponse' is implicitly deleted because field > > 'providing_risk_advisory_data' is of const-qualified type 'const bool' > > const bool providing_risk_advisory_data; > > ^ > > well yes, you have to change how it's initialized (use the initializer list on > all platforms) Yeah, I assumed that's what you meant, but the error is the same without the platform-specific part. If the constructor is simply: CardUnmaskDelegate::UnmaskResponse::UnmaskResponse() : should_store_pan(false), providing_risk_advisory_data(false) {} the compiler still complains. I don't claim to understand all the subtleties of C++ object initialization, though, so if you think there's a way to make it work, let me know.
On 2015/05/21 01:20:21, Justin Donnelly wrote: > On 2015/05/21 01:08:12, Evan Stade wrote: > > On 2015/05/21 00:29:51, Justin Donnelly wrote: > > > > > > https://codereview.chromium.org/1148123003/diff/40001/components/autofill/cor... > > > File components/autofill/core/browser/card_unmask_delegate.h (left): > > > > > > > > > https://codereview.chromium.org/1148123003/diff/40001/components/autofill/cor... > > > components/autofill/core/browser/card_unmask_delegate.h:37: bool > > > providing_risk_advisory_data = false; > > > On 2015/05/20 23:30:34, Evan Stade wrote: > > > > const bool? > > > > > > Adding const produces the following compile error: > > > > > > > > > ../../components/autofill/core/browser/ui/card_unmask_prompt_controller_impl.cc:51:21: > > > error: object of type 'autofill::CardUnmaskDelegate::UnmaskResponse' cannot > be > > > assigned because its copy assignment operator is implicitly deleted > > > pending_response_ = CardUnmaskDelegate::UnmaskResponse(); > > > ^ > > > ../../components/autofill/core/browser/card_unmask_delegate.h:37:16: note: > > copy > > > assignment operator of 'UnmaskResponse' is implicitly deleted because field > > > 'providing_risk_advisory_data' is of const-qualified type 'const bool' > > > const bool providing_risk_advisory_data; > > > ^ > > > > well yes, you have to change how it's initialized (use the initializer list on > > all platforms) > > Yeah, I assumed that's what you meant, but the error is the same without the > platform-specific part. If the constructor is simply: > > CardUnmaskDelegate::UnmaskResponse::UnmaskResponse() > : should_store_pan(false), > providing_risk_advisory_data(false) {} > > the compiler still complains. I don't claim to understand all the subtleties of > C++ object initialization, though, so if you think there's a way to make it > work, let me know. oh ok, I see the problem. Didn't read the error message closely enough. Could get around it by using heap allocation at the callsite but that doesn't seem worth it. I guess we can live without const. lgtm
The CQ bit was checked by jdonnelly@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1148123003/40001
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/bcd6c7c0db2dea4595b048df3b3fa429481dd80f Cr-Commit-Position: refs/heads/master@{#330885} |