|
|
Description[Extensions] Deprecate old install prompt types
Remove old install prompt types from the code. Because the enum is used
in histograms, this isn't removed completely, but we can comment them
out to make sure they aren't used.
Also move away from using the "array of messages" approach, because this
required padding with 0's for deprecated types, and was significantly
harder to read.
Finally, remove a few deprecated messages that were found by doing this.
BUG=689227
Review-Url: https://codereview.chromium.org/2705733002
Cr-Commit-Position: refs/heads/master@{#452038}
Committed: https://chromium.googlesource.com/chromium/src/+/c7f8d139f448266d41723a8fba0347a246111c03
Patch Set 1 #Patch Set 2 : . #
Total comments: 8
Patch Set 3 : lazyboy's #
Messages
Total messages: 33 (21 generated)
Description was changed from ========== [Extensions] Deprecate old install prompt types Remove old install prompt types from the code. Because the enum is used in histograms, this isn't removed completely, but we can comment them out to make sure they aren't used. Also move away from using the "array of messages" approach, because this required padding with 0's for deprecated types, and was significantly harder to read. Finally, remove a few deprecated messages that were found by doing this. BUG=None ========== to ========== [Extensions] Deprecate old install prompt types Remove old install prompt types from the code. Because the enum is used in histograms, this isn't removed completely, but we can comment them out to make sure they aren't used. Also move away from using the "array of messages" approach, because this required padding with 0's for deprecated types, and was significantly harder to read. Finally, remove a few deprecated messages that were found by doing this. BUG=689227 ==========
The CQ bit was checked by rdevlin.cronin@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 checked by rdevlin.cronin@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: cast_shell_linux on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
The CQ bit was checked by rdevlin.cronin@chromium.org
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
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full committers or once the patch has received an L-G-T-M from a full committer. Even if an L-G-T-M may have been provided, it was from a non-committer, _not_ a full super star committer. Committers are members of the group "project-chromium-committers". Note that this has nothing to do with OWNERS files.
rdevlin.cronin@chromium.org changed reviewers: + lazyboy@chromium.org
lazyboy@, mind taking a look? I personally find it a lot easier to grok which prompts show which titles without the map lookups (especially since half of them required further logic anyway), but lemme know if you feel differently.
Agreed this is more readable, few comments. https://codereview.chromium.org/2705733002/diff/20001/chrome/browser/extensio... File chrome/browser/extensions/extension_install_prompt.cc (right): https://codereview.chromium.org/2705733002/diff/20001/chrome/browser/extensio... chrome/browser/extensions/extension_install_prompt.cc:140: NOTREACHED(); Can types_ be ever set to these upon constructing ExtensionInstallPrompt? If not, maybe we can DCHECK these in the constructor and make type_ const. I couldn't find code that calls ExtensionInstallPrompt::set_type()... https://codereview.chromium.org/2705733002/diff/20001/chrome/browser/extensio... chrome/browser/extensions/extension_install_prompt.cc:281: buttons = ui::DIALOG_BUTTON_CANCEL; Since there's only one special case, I think even the following would be simpler to read: DCHECK(type_ != UNSET_PROMPT_TYPE && type_ != NUM_PROMPT_TYPES) if (type_ == POST_INSTALL_PERMISSIONS_PROMPT) if (ShouldDisplayRevokeButton()) return CANCEL|OK; else return CANCEL; return OK|CANCEL; https://codereview.chromium.org/2705733002/diff/20001/chrome/browser/extensio... chrome/browser/extensions/extension_install_prompt.cc:307: case RE_ENABLE_PROMPT: RE_ENABLE_PROMPT used to return IDS_EXTENSION_PROMPT_RE_ENABLE_BUTTON (kAccpetButtonIds[3]) PERMISSIONS_PROMPT used to return IDS_EXTENSION_PROMPT_PERMISSIONS_BUTTON (kAcceptButtonIds[4]) Is this change intentional? https://codereview.chromium.org/2705733002/diff/20001/chrome/browser/extensio... chrome/browser/extensions/extension_install_prompt.cc:326: // If there are neither retained files nor devices, leave id 0 so there "leave id to -1"
https://codereview.chromium.org/2705733002/diff/20001/chrome/browser/extensio... File chrome/browser/extensions/extension_install_prompt.cc (right): https://codereview.chromium.org/2705733002/diff/20001/chrome/browser/extensio... chrome/browser/extensions/extension_install_prompt.cc:140: NOTREACHED(); On 2017/02/21 21:43:05, lazyboy wrote: > Can types_ be ever set to these upon constructing ExtensionInstallPrompt? > If not, maybe we can DCHECK these in the constructor and make type_ const. I > couldn't find code that calls ExtensionInstallPrompt::set_type()... Done. https://codereview.chromium.org/2705733002/diff/20001/chrome/browser/extensio... chrome/browser/extensions/extension_install_prompt.cc:281: buttons = ui::DIALOG_BUTTON_CANCEL; On 2017/02/21 21:43:05, lazyboy wrote: > Since there's only one special case, I think even the following would be simpler > to read: > > DCHECK(type_ != UNSET_PROMPT_TYPE && type_ != NUM_PROMPT_TYPES) > if (type_ == POST_INSTALL_PERMISSIONS_PROMPT) > if (ShouldDisplayRevokeButton()) return CANCEL|OK; > else return CANCEL; > > return OK|CANCEL; Done. https://codereview.chromium.org/2705733002/diff/20001/chrome/browser/extensio... chrome/browser/extensions/extension_install_prompt.cc:307: case RE_ENABLE_PROMPT: On 2017/02/21 21:43:05, lazyboy wrote: > RE_ENABLE_PROMPT used to return > IDS_EXTENSION_PROMPT_RE_ENABLE_BUTTON (kAccpetButtonIds[3]) > > PERMISSIONS_PROMPT used to return > IDS_EXTENSION_PROMPT_PERMISSIONS_BUTTON (kAcceptButtonIds[4]) > > Is this change intentional? Good catch! Changed. https://codereview.chromium.org/2705733002/diff/20001/chrome/browser/extensio... chrome/browser/extensions/extension_install_prompt.cc:326: // If there are neither retained files nor devices, leave id 0 so there On 2017/02/21 21:43:05, lazyboy wrote: > "leave id to -1" Done.
The CQ bit was checked by rdevlin.cronin@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...
lgtm
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
The CQ bit was checked by rdevlin.cronin@chromium.org
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: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
The CQ bit was checked by rdevlin.cronin@chromium.org
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: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by rdevlin.cronin@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": 40001, "attempt_start_ts": 1487771806624140, "parent_rev": "319c00e1c8188a7264d674e6bceeb35cb7e6dc63", "commit_rev": "c7f8d139f448266d41723a8fba0347a246111c03"}
Message was sent while issue was closed.
Description was changed from ========== [Extensions] Deprecate old install prompt types Remove old install prompt types from the code. Because the enum is used in histograms, this isn't removed completely, but we can comment them out to make sure they aren't used. Also move away from using the "array of messages" approach, because this required padding with 0's for deprecated types, and was significantly harder to read. Finally, remove a few deprecated messages that were found by doing this. BUG=689227 ========== to ========== [Extensions] Deprecate old install prompt types Remove old install prompt types from the code. Because the enum is used in histograms, this isn't removed completely, but we can comment them out to make sure they aren't used. Also move away from using the "array of messages" approach, because this required padding with 0's for deprecated types, and was significantly harder to read. Finally, remove a few deprecated messages that were found by doing this. BUG=689227 Review-Url: https://codereview.chromium.org/2705733002 Cr-Commit-Position: refs/heads/master@{#452038} Committed: https://chromium.googlesource.com/chromium/src/+/c7f8d139f448266d41723a8fba03... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/c7f8d139f448266d41723a8fba03... |