Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: components/component_updater/component_updater_service.h

Issue 2154773002: Implement Just-In-Time Flash updates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git pull && gclient sync Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..48ae4799addf805e38613775c8554e57dec3b600 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(const std::string& id, const base::string16& name);
+ ~ComponentInfo();
+
+ const std::string id;
+ const 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,13 @@ class ComponentUpdateService {
// Returns a list of registered components.
virtual std::vector<std::string> GetComponentIDs() const = 0;
+ // Returns a ComponentInfo describing a registered component that implements a
+ // handler for the specified |mime_type|. If multiple such components exist,
+ // returns information for the one that was most recently registered. If no
+ // such components exist, returns nullptr.
+ virtual std::unique_ptr<ComponentInfo> GetComponentForMimeType(
+ const std::string& mime_type) 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 +156,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
« no previous file with comments | « chrome/renderer/plugins/chrome_plugin_placeholder.cc ('k') | components/component_updater/component_updater_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698