| Index: components/component_updater/component_updater_service.h
|
| diff --git a/components/component_updater/component_updater_service.h b/components/component_updater/component_updater_service.h
|
| index 7abf4d6bc955908e802777df0a2874d5e9863a19..c257ae499a5981adf4f943102206572586ad3ab9 100644
|
| --- a/components/component_updater/component_updater_service.h
|
| +++ b/components/component_updater/component_updater_service.h
|
| @@ -19,6 +19,7 @@
|
| #include "url/gurl.h"
|
|
|
| class ComponentsUI;
|
| +class PluginObserver;
|
| class SupervisedUserWhitelistService;
|
|
|
| namespace base {
|
| @@ -51,6 +52,14 @@ using Configurator = update_client::Configurator;
|
| using CrxComponent = update_client::CrxComponent;
|
| using CrxUpdateItem = update_client::CrxUpdateItem;
|
|
|
| +struct ComponentInfo {
|
| + ComponentInfo();
|
| + ~ComponentInfo();
|
| +
|
| + std::string id;
|
| + base::string16 name;
|
| +};
|
| +
|
| // The component update service is in charge of installing or upgrading
|
| // select parts of chrome. Each part is called a component and managed by
|
| // instances of CrxComponent registered using RegisterComponent(). On the
|
| @@ -96,6 +105,14 @@ class ComponentUpdateService {
|
| // Returns a list of registered components.
|
| virtual std::vector<std::string> GetComponentIDs() const = 0;
|
|
|
| + // Returns true and fills the members of |info| if there is a registered
|
| + // component that implements a handler for the specified |mime_type|; else
|
| + // returns false and does not mutate the members of |info|. If multiple
|
| + // such components exist, returns information for the one that was most
|
| + // recently registered.
|
| + virtual bool GetComponentForMimeType(const std::string& mime_type,
|
| + ComponentInfo* info) const = 0;
|
| +
|
| // Returns an interface for on-demand updates. On-demand updates are
|
| // proactively triggered outside the normal component update service schedule.
|
| virtual OnDemandUpdater& GetOnDemandUpdater() = 0;
|
| @@ -140,6 +157,7 @@ class OnDemandUpdater {
|
| friend class OnDemandTester;
|
| friend class SupervisedUserWhitelistInstaller;
|
| friend class ::ComponentsUI;
|
| + friend class ::PluginObserver;
|
|
|
| // Triggers an update check for a component. |id| is a value
|
| // returned by GetCrxComponentID(). If an update for this component is already
|
|
|