|
|
Created:
3 years, 9 months ago by Timothy Loh Modified:
3 years, 8 months ago CC:
chromium-reviews, mlamouri+watch-permissions_chromium.org, raymes+watch_chromium.org, chrome-apps-syd-reviews_chromium.org Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionMove requests from GroupedPermissionInfoBarDelegate to PermissionPromptAndroid
This patch moves the Vector<PermissionRequest> stored in
GroupedPermissionInfoBarDelegate to PermissionPromptAndroid. This will
allow us to later share the PermissionPromptAndroid class in
PermissionDialogDelegate as storage for this same vector, as we already
will need such a pointer to delegate the the user action callbacks.
BUG=606138
TBR=dfalcantara
Review-Url: https://codereview.chromium.org/2757483002
Cr-Commit-Position: refs/heads/master@{#460005}
Committed: https://chromium.googlesource.com/chromium/src/+/4187ef8e65b069e4d3e5645446ad04ebdb1c527e
Patch Set 1 #
Total comments: 8
Patch Set 2 : addr comments #Patch Set 3 : rebase #
Total comments: 2
Patch Set 4 : rm infobarservice fwd decl #
Total comments: 2
Patch Set 5 : rename inline function #
Messages
Total messages: 41 (27 generated)
The CQ bit was checked by timloh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Move requests from GroupedPermissionInfoBarDelegate to PermissionPromptAndroid This patch moves the Vector<PermissionRequest> from GroupedPermissionInfoBarDelegate to PermissionPromptAndroid. This will allow us to later share the PermissionPromptAndroid class in PermissionDialogDelegate as storage for this same vector, as we already will need such a pointer to delegate the the user action callbacks. BUG=606138 ========== to ========== Move requests from GroupedPermissionInfoBarDelegate to PermissionPromptAndroid This patch moves the Vector<PermissionRequest> stored in GroupedPermissionInfoBarDelegate to PermissionPromptAndroid. This will allow us to later share the PermissionPromptAndroid class in PermissionDialogDelegate as storage for this same vector, as we already will need such a pointer to delegate the the user action callbacks. BUG=606138 ==========
timloh@chromium.org changed reviewers: + dominickn@chromium.org
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Thanks Tim! https://codereview.chromium.org/2757483002/diff/1/chrome/browser/permissions/... File chrome/browser/permissions/permission_prompt_android.cc (right): https://codereview.chromium.org/2757483002/diff/1/chrome/browser/permissions/... chrome/browser/permissions/permission_prompt_android.cc:74: requests_.clear(); Should requests be cleared before or after calling the delegate method? Seems a bit weird to clear it first. https://codereview.chromium.org/2757483002/diff/1/chrome/browser/permissions/... File chrome/browser/permissions/permission_prompt_android.h (right): https://codereview.chromium.org/2757483002/diff/1/chrome/browser/permissions/... chrome/browser/permissions/permission_prompt_android.h:7: Nit: #include <vector> https://codereview.chromium.org/2757483002/diff/1/chrome/browser/permissions/... chrome/browser/permissions/permission_prompt_android.h:10: class InfoBarService; nit: class PermissionRequest; https://codereview.chromium.org/2757483002/diff/1/chrome/browser/permissions/... chrome/browser/permissions/permission_prompt_android.h:40: const std::vector<PermissionRequest*>& Requests() { return requests_; } Instead of exposing the requests directly, I think it's nicer to have GetContentSettingsType etc methods on PermissionPromptAndroid which take a position and then internally operate on the appropriate request. Similarly PermissionCount() should delegate to PermissionPromptAndroid.
The CQ bit was checked by timloh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by timloh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2757483002/diff/1/chrome/browser/permissions/... File chrome/browser/permissions/permission_prompt_android.cc (right): https://codereview.chromium.org/2757483002/diff/1/chrome/browser/permissions/... chrome/browser/permissions/permission_prompt_android.cc:74: requests_.clear(); On 2017/03/16 03:55:07, dominickn wrote: > Should requests be cleared before or after calling the delegate method? Seems a > bit weird to clear it first. If we have a queued request, the PermissionRequestManager will Show() it, assigning a new value to the vector, so we can't clear it after. https://codereview.chromium.org/2757483002/diff/1/chrome/browser/permissions/... File chrome/browser/permissions/permission_prompt_android.h (right): https://codereview.chromium.org/2757483002/diff/1/chrome/browser/permissions/... chrome/browser/permissions/permission_prompt_android.h:7: On 2017/03/16 03:55:07, dominickn wrote: > Nit: #include <vector> Done. https://codereview.chromium.org/2757483002/diff/1/chrome/browser/permissions/... chrome/browser/permissions/permission_prompt_android.h:10: class InfoBarService; On 2017/03/16 03:55:07, dominickn wrote: > nit: class PermissionRequest; Done. https://codereview.chromium.org/2757483002/diff/1/chrome/browser/permissions/... chrome/browser/permissions/permission_prompt_android.h:40: const std::vector<PermissionRequest*>& Requests() { return requests_; } On 2017/03/16 03:55:07, dominickn wrote: > Instead of exposing the requests directly, I think it's nicer to have > GetContentSettingsType etc methods on PermissionPromptAndroid which take a > position and then internally operate on the appropriate request. > > Similarly PermissionCount() should delegate to PermissionPromptAndroid. Done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm, thanks! https://codereview.chromium.org/2757483002/diff/40001/chrome/browser/permissi... File chrome/browser/permissions/permission_prompt_android.h (right): https://codereview.chromium.org/2757483002/diff/40001/chrome/browser/permissi... chrome/browser/permissions/permission_prompt_android.h:14: class InfoBarService; I don't think InfoBarService is needed.
The CQ bit was checked by timloh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2757483002/diff/40001/chrome/browser/permissi... File chrome/browser/permissions/permission_prompt_android.h (right): https://codereview.chromium.org/2757483002/diff/40001/chrome/browser/permissi... chrome/browser/permissions/permission_prompt_android.h:14: class InfoBarService; On 2017/03/17 01:48:13, dominickn wrote: > I don't think InfoBarService is needed. Done.
timloh@chromium.org changed reviewers: + benwells@chromium.org
+benwells@ for OWNERS, thanks!
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm withanit https://codereview.chromium.org/2757483002/diff/60001/chrome/browser/permissi... File chrome/browser/permissions/permission_prompt_android.h (right): https://codereview.chromium.org/2757483002/diff/60001/chrome/browser/permissi... chrome/browser/permissions/permission_prompt_android.h:44: size_t PermissionCount() const { return requests_.size(); } Nit: use unix_hacker_style for inline function name. https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md...
https://codereview.chromium.org/2757483002/diff/60001/chrome/browser/permissi... File chrome/browser/permissions/permission_prompt_android.h (right): https://codereview.chromium.org/2757483002/diff/60001/chrome/browser/permissi... chrome/browser/permissions/permission_prompt_android.h:44: size_t PermissionCount() const { return requests_.size(); } On 2017/03/20 03:10:43, benwells wrote: > Nit: use unix_hacker_style for inline function name. > > https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md... Done.
timloh@chromium.org changed reviewers: + dfalcantara@chromium.org
Description was changed from ========== Move requests from GroupedPermissionInfoBarDelegate to PermissionPromptAndroid This patch moves the Vector<PermissionRequest> stored in GroupedPermissionInfoBarDelegate to PermissionPromptAndroid. This will allow us to later share the PermissionPromptAndroid class in PermissionDialogDelegate as storage for this same vector, as we already will need such a pointer to delegate the the user action callbacks. BUG=606138 ========== to ========== Move requests from GroupedPermissionInfoBarDelegate to PermissionPromptAndroid This patch moves the Vector<PermissionRequest> stored in GroupedPermissionInfoBarDelegate to PermissionPromptAndroid. This will allow us to later share the PermissionPromptAndroid class in PermissionDialogDelegate as storage for this same vector, as we already will need such a pointer to delegate the the user action callbacks. BUG=606138 TBR=dfalcantara ==========
tbr-ing dfalcantara for a trivial change in chrome/browser/ui/android/infobars/grouped_permission_infobar.cc
The CQ bit was checked by timloh@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dominickn@chromium.org, benwells@chromium.org Link to the patchset: https://codereview.chromium.org/2757483002/#ps80001 (title: "rename inline function")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...)
The CQ bit was checked by timloh@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 80001, "attempt_start_ts": 1490670604050830, "parent_rev": "827f29b097efd519b9248d0bcf8e8432c43918e6", "commit_rev": "4187ef8e65b069e4d3e5645446ad04ebdb1c527e"}
Message was sent while issue was closed.
Description was changed from ========== Move requests from GroupedPermissionInfoBarDelegate to PermissionPromptAndroid This patch moves the Vector<PermissionRequest> stored in GroupedPermissionInfoBarDelegate to PermissionPromptAndroid. This will allow us to later share the PermissionPromptAndroid class in PermissionDialogDelegate as storage for this same vector, as we already will need such a pointer to delegate the the user action callbacks. BUG=606138 TBR=dfalcantara ========== to ========== Move requests from GroupedPermissionInfoBarDelegate to PermissionPromptAndroid This patch moves the Vector<PermissionRequest> stored in GroupedPermissionInfoBarDelegate to PermissionPromptAndroid. This will allow us to later share the PermissionPromptAndroid class in PermissionDialogDelegate as storage for this same vector, as we already will need such a pointer to delegate the the user action callbacks. BUG=606138 TBR=dfalcantara Review-Url: https://codereview.chromium.org/2757483002 Cr-Commit-Position: refs/heads/master@{#460005} Committed: https://chromium.googlesource.com/chromium/src/+/4187ef8e65b069e4d3e5645446ad... ==========
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as https://chromium.googlesource.com/chromium/src/+/4187ef8e65b069e4d3e5645446ad...
Message was sent while issue was closed.
post-commit lgtm |