• Devlin Cronin's avatar
    [Extensions] Combine ExtensionAction logic on ExtensionActionManager · c7002c2f
    Devlin Cronin authored
    Instead of having separate stores and getters for page and browser
    actions on ExtensionActionManager, have a single store for all actions.
    Similarly, remove the type-specific GetPageAction() and
    GetBrowserAction() methods from ExtensionActionManager, and only use
    GetExtensionAction().
    
    Call sites that rely on a certain type of action (which is relatively
    rare) now check the action type through ExtensionAction::action_type().
    
    Also clean up extension_action_manager_unittest.cc to use parameterized
    tests and more targeted cases.
    
    This CL does not yet hook up generic actions (specified through the
    "action" key in the manifest) to ExtensionActionManager; that will
    happen next.
    
    Bug: 893373
    
    Change-Id: Ib82f2f71b27f1118f2c02b9376cc5849aafab50a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1585959
    Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
    Reviewed-by: default avatarKaran Bhatia <karandeepb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#659757}
    c7002c2f
extension_action_manager_unittest.cc 5.34 KB