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

Unified Diff: chrome/browser/ui/toolbar/component_toolbar_actions_factory.h

Issue 2693063003: Unload old Cast extensions after initializing ToolbarActionsModel (Closed)
Patch Set: Remove virtual, rebase Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/toolbar/component_toolbar_actions_factory.h
diff --git a/chrome/browser/ui/toolbar/component_toolbar_actions_factory.h b/chrome/browser/ui/toolbar/component_toolbar_actions_factory.h
index 7768b7db6eff8c9730aeab98e1df927f0264d65a..6b2d58bb69178021c6e81f5ce0cbcd1b8ea57362 100644
--- a/chrome/browser/ui/toolbar/component_toolbar_actions_factory.h
+++ b/chrome/browser/ui/toolbar/component_toolbar_actions_factory.h
@@ -13,15 +13,22 @@
#include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
class Browser;
+class ExtensionService;
class Profile;
class ToolbarActionViewController;
+namespace extensions {
+class ExtensionRegistry;
+}
+
// The registry for all component toolbar actions. Component toolbar actions
// are actions that live in the toolbar (like extension actions), but are
// components of chrome, such as ChromeCast.
class ComponentToolbarActionsFactory {
public:
- // Component action IDs.
+ // Extension and component action IDs.
+ static const char kCastBetaExtensionId[];
+ static const char kCastExtensionId[];
static const char kMediaRouterActionId[];
ComponentToolbarActionsFactory();
@@ -39,11 +46,21 @@ class ComponentToolbarActionsFactory {
Browser* browser,
ToolbarActionsBar* bar);
+ // Unloads extensions that were migrated to component actions and therefore
+ // are no longer needed.
+ void UnloadMigratedExtensions(ExtensionService* service,
+ extensions::ExtensionRegistry* registry);
+
// Sets the factory to use for testing purposes.
// Ownership remains with the caller.
static void SetTestingFactory(ComponentToolbarActionsFactory* factory);
private:
+ // Unloads an extension if it is active.
+ void UnloadExtension(ExtensionService* service,
+ extensions::ExtensionRegistry* registry,
+ const std::string& extension_id);
+
DISALLOW_COPY_AND_ASSIGN(ComponentToolbarActionsFactory);
};
« no previous file with comments | « no previous file | chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698