New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 691575 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 1
Type: Bug



Sign in to add a comment

Cast extension reappears due to the removal of component action migration mechanism

Project Member Reported by sdy@chromium.org, Feb 13 2017

Issue description

Chrome Version: 58.0.3010.0 (+- a release, sorry)
OS: macOS 10.12.3

Last night, the wrench menu on my home machine turned into an exclamation point, and when I clicked it said that the Cast extension had requested new permissions (I think it mentioned being able to read and change data on all websites, and being able to communicate with cooperating devices on the network).

Just to see what would happen, I chose the option to remove it from Chrome. The Cast UI still shows up (I didn't have a chance to try casting, though).
 

Comment 1 by sdy@chromium.org, Feb 13 2017

Cc: mfo...@chromium.org jmukthavaram@chromium.org
Possibly related to  issue 691393 ?

Comment 2 by w...@chromium.org, Feb 13 2017

FWIW I recently observed an unexpected permissions prompt for Chrome Remote Desktop (see  issue 639161 , which I pinged about that). That coincided with an update having been pushed, to Chrome Remote Desktop's app.

Comment 3 by mfo...@chromium.org, Feb 13 2017

Owner: taku...@chromium.org
Status: Assigned (was: Untriaged)
Takumi, When you removed the extension migration code, did you test what would happen on a profile that had previously installed the Cast extension?  One of the functions of that code is to prevent loading the Cast extension on profiles that have MR enabled.  We may need to roll back that part of the change, otherwise, people will start seeing the Cast extension re-enabled.



Comment 4 by mfo...@chromium.org, Feb 13 2017

It may be simpler to add these IDs to a blacklist of extensions that are prevented from loading.

Cc: rdevlin....@chromium.org
Summary: Cast extension reappears due to the removal of component action migration mechanism (was: Cast extension requires new permissions?)
This does seem to be because of my CL to remove the extension migration code [1]. Just tested with a profile with the Cast extension, and the old extension icon does come back. Should we add code to uninstall it if it's installed?

Previously we were unloading the extension in ToolbarActionsModel::OnReady() by calling ComponentToolbarActionsFactory::HandleComponentMigrations(). We can add something similar back, except we uninstall the extension instead of unloading it.

Mark, Devlin, does that sound alright?

[1] https://codereview.chromium.org/2678083005/
Components: -Internals>Cast Internals>Cast>UI
Labels: -Pri-3 OS-Chrome OS-Linux OS-Mac OS-Windows Pri-1

Comment 7 by mfo...@chromium.org, Feb 13 2017

I would be inclined to fix the loading problem and later add a codepath to uninstall (if that's the preferred route).

Blacklisting would show a dialog that says the Google Cast extension has been disabled, so I don't think we should do that. We could unload the extension like we were doing before.
Unload or uninstall both sound reasonable to me.
OK, I'm happy with what has a reasonable implementation and best (i.e. invisible) experience.

Status: Started (was: Assigned)
Project Member

Comment 12 by bugdroid1@chromium.org, Feb 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6ac78638dbd719015453216fb4c9fa8185bc885f

commit 6ac78638dbd719015453216fb4c9fa8185bc885f
Author: takumif <takumif@chromium.org>
Date: Wed Feb 15 19:16:23 2017

Unload old Cast extensions after initializing ToolbarActionsModel

With the removal of ComponentMigrationHelper, we removed the mechanism for
unloading the old Cast and Cast Beta extensions, which have been replaced by
Media Router and are no longer functional. This CL adds back unloading of those
extensions so that users would not see the old extensions.

BUG= 691575 

Review-Url: https://codereview.chromium.org/2693063003
Cr-Commit-Position: refs/heads/master@{#450761}

[modify] https://crrev.com/6ac78638dbd719015453216fb4c9fa8185bc885f/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc
[modify] https://crrev.com/6ac78638dbd719015453216fb4c9fa8185bc885f/chrome/browser/ui/toolbar/component_toolbar_actions_factory.h
[add] https://crrev.com/6ac78638dbd719015453216fb4c9fa8185bc885f/chrome/browser/ui/toolbar/component_toolbar_actions_factory_unittest.cc
[modify] https://crrev.com/6ac78638dbd719015453216fb4c9fa8185bc885f/chrome/browser/ui/toolbar/toolbar_actions_model.cc
[modify] https://crrev.com/6ac78638dbd719015453216fb4c9fa8185bc885f/chrome/test/BUILD.gn

Status: Fixed (was: Started)
Labels: M-58
Status: Started (was: Fixed)
Reopening this due to several issues:
* When the Cast extension is disabled, it does not get unloaded (and the user can enable it from chrome://extensions)
* When the extension state syncs after initial unloading, then the extension gets loaded again

A fix is in the works:
https://codereview.chromium.org/2803923002/
Cc: sko...@chromium.org imch...@chromium.org
In the CR in c#14 Devlin mentioned that we usually make extensions uninstall themselves rather than make Chromium do so, and suggested that we modify the legacy extension to do so. Derek/Mark/Stephen, is there any reason we wouldn't want to go ahead and do that?
Won't the extension have to be loaded?  We currently block loading in most cases and are trying to fix the corner cases that are missed.


Right. To cover the corner cases I think we can either unload from Chromium side or uninstall from the legacy extension side, and in the case of former I think we should merge back to M58.
I think we'll eventually have to update the extension to uninstall itself, and remove the unloading code path to let the uninstallation execute.
OK.

It will be a bit of work to recreate a legacy extension with a single script to uninstall itself, and get it uploaded to the web store.  I guess we'll have to do it if that's the only alternative.

I'm fine with having the extension unload itself.  
Status: Fixed (was: Started)
Closing, since the beta and stable legacy extensions were updated with the fix.
More info in  crbug.com/713822 

Sign in to add a comment