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

Unified Diff: chrome/browser/extensions/component_migration_helper.cc

Issue 1612203002: [Media Router] Adds a contextual menu item to remove the MR component action. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to pkasting@ comments Created 4 years, 11 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: chrome/browser/extensions/component_migration_helper.cc
diff --git a/chrome/browser/extensions/component_migration_helper.cc b/chrome/browser/extensions/component_migration_helper.cc
index e2baca13ab7adfe7c1b42d7a85ee53fe22a29593..389959a3f5b2b3fe5fcc4ca908fa278983b7c37f 100644
--- a/chrome/browser/extensions/component_migration_helper.cc
+++ b/chrome/browser/extensions/component_migration_helper.cc
@@ -113,6 +113,16 @@ void ComponentMigrationHelper::OnFeatureDisabled(
delegate_->RemoveComponentAction(component_action_id);
}
+void ComponentMigrationHelper::OnActionRemoved(
+ const std::string& component_action_id) {
+ // Record preference for the future.
+ SetComponentActionPref(component_action_id, false);
+
+ // Remove the action.
+ if (delegate_->HasComponentAction(component_action_id))
+ delegate_->RemoveComponentAction(component_action_id);
+}
+
void ComponentMigrationHelper::OnExtensionReady(
content::BrowserContext* browser_context,
const Extension* extension) {

Powered by Google App Engine
This is Rietveld 408576698