Commit e69a9528 authored by Devlin Cronin's avatar Devlin Cronin Committed by Commit Bot

[Extensions] Add comment in ExtensionInstallPrompt discouraging more types

ExtensionInstallPrompt started out life as a prompt to install an
extension, but has since grown into a franken-prompt used for many
different pieces of extension functionality. This leads to technical
debt and complexity, hard-to-reason about code, excessive redirection,
etc, and a number of bugs have been filed about trying to simplify it
(e.g. crbug.com/567839).

Add a comment in ExtensionInstallPrompt discouraging the addition of any
new types that don't actually prompt to install an extension. New code
that needs a dialog should implement a new dialog, rather than piggy-
backing on this class.

Bug: None
Change-Id: I00476b3d4cda8efbbe2b7cf4ae3c39935f004402
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2075083Reviewed-by: default avatarKaran Bhatia <karandeepb@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#744806}
parent abe6938e
...@@ -71,6 +71,9 @@ class ExtensionInstallPrompt { ...@@ -71,6 +71,9 @@ class ExtensionInstallPrompt {
EXTENSION_REQUEST_PROMPT = 13, EXTENSION_REQUEST_PROMPT = 13,
EXTENSION_PENDING_REQUEST_PROMPT = 14, EXTENSION_PENDING_REQUEST_PROMPT = 14,
NUM_PROMPT_TYPES = 15, NUM_PROMPT_TYPES = 15,
// WAIT! Are you adding a new prompt type? Does it *install an extension*?
// If not, please create a new dialog, rather than adding more functionality
// to this class - it's already too full.
}; };
// The last prompt type to display; only used for testing. // The last prompt type to display; only used for testing.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment