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

Issue 2668863002: [Extensions] Remove FeatureSwitch::easy_off_store_install (Closed)

Created:
3 years, 10 months ago by Devlin
Modified:
3 years, 10 months ago
CC:
asanka, arv+watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, dcheng, extensions-reviews_chromium.org, michaelpg+watch-md-ui_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Extensions] Remove FeatureSwitch::easy_off_store_install The "easy off-store install" switch is used to determine whether or not chrome will automatically install an extension that isn't hosted in the webstore if the user downloads it. However, this has been disabled on all platforms, and has no associated commandline switch or flag, so it is permanently disabled. The only usages are in tests. Remove the feature switch and add a lighter-weight test function to accommodate. Also re-enable an effectively-disabled extension browsertest (which only ran when the easy off-store install switch was enabled - and that was never true). BUG=687623 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2668863002 Cr-Commit-Position: refs/heads/master@{#448311} Committed: https://chromium.googlesource.com/chromium/src/+/10f3454a3b79fc102ebb1b71e48bedf790eaccba

Patch Set 1 #

Patch Set 2 : . #

Total comments: 3

Patch Set 3 : Add TODO for histograms #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -110 lines) Patch
M chrome/browser/download/download_browsertest.cc View 7 chunks +10 lines, -12 lines 0 comments Download
M chrome/browser/download/download_crx_util.h View 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/download/download_crx_util.cc View 2 chunks +11 lines, -2 lines 0 comments Download
M chrome/browser/download/download_target_determiner.cc View 1 chunk +0 lines, -11 lines 0 comments Download
M chrome/browser/extensions/crx_installer.cc View 1 2 2 chunks +25 lines, -35 lines 1 comment Download
M chrome/browser/extensions/crx_installer_browsertest.cc View 2 chunks +4 lines, -9 lines 0 comments Download
M chrome/browser/extensions/extension_install_prompt.cc View 1 chunk +3 lines, -10 lines 0 comments Download
M chrome/browser/resources/extensions/extensions.js View 1 chunk +14 lines, -16 lines 0 comments Download
M chrome/browser/resources/md_extensions/drop_overlay.js View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/extensions/install_extension_handler.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M extensions/common/feature_switch.h View 1 chunk +0 lines, -1 line 0 comments Download
M extensions/common/feature_switch.cc View 3 chunks +1 line, -9 lines 0 comments Download

Messages

Total messages: 17 (9 generated)
Devlin
Hey folks, mind taking a look? lazyboy: extensions asanka: downloads dbeam: resources, webui pastarmovj: question ...
3 years, 10 months ago (2017-02-01 17:17:43 UTC) #7
lazyboy
lgtm https://codereview.chromium.org/2668863002/diff/40001/chrome/browser/extensions/crx_installer.cc File chrome/browser/extensions/crx_installer.cc (right): https://codereview.chromium.org/2668863002/diff/40001/chrome/browser/extensions/crx_installer.cc#newcode330 chrome/browser/extensions/crx_installer.cc:330: // should either add them to histograms.xml or ...
3 years, 10 months ago (2017-02-01 20:12:13 UTC) #8
asanka
/download/ lgtm
3 years, 10 months ago (2017-02-01 22:36:12 UTC) #9
Dan Beam
lgtm
3 years, 10 months ago (2017-02-02 07:00:57 UTC) #10
Devlin
https://codereview.chromium.org/2668863002/diff/20001/chrome/browser/download/download_crx_util.cc File chrome/browser/download/download_crx_util.cc (right): https://codereview.chromium.org/2668863002/diff/20001/chrome/browser/download/download_crx_util.cc#newcode136 chrome/browser/download/download_crx_util.cc:136: return g_allow_offstore_install_for_testing || On 2017/02/01 17:17:42, Devlin wrote: > ...
3 years, 10 months ago (2017-02-06 17:22:33 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2668863002/40001
3 years, 10 months ago (2017-02-06 17:23:12 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/10f3454a3b79fc102ebb1b71e48bedf790eaccba
3 years, 10 months ago (2017-02-06 18:23:34 UTC) #16
pastarmovj
3 years, 10 months ago (2017-02-07 06:49:06 UTC) #17
Message was sent while issue was closed.
https://codereview.chromium.org/2668863002/diff/20001/chrome/browser/download...
File chrome/browser/download/download_crx_util.cc (right):

https://codereview.chromium.org/2668863002/diff/20001/chrome/browser/download...
chrome/browser/download/download_crx_util.cc:136: return
g_allow_offstore_install_for_testing ||
On 2017/02/06 17:22:33, Devlin wrote:
> On 2017/02/01 17:17:42, Devlin wrote:
> > pastarmovj@: I'd rather just have tests set the preference that the
management
> > policy uses, which is pref_names::kAllowedInstallSites.  Unfortunately, this
> is
> > a managed preference, and I can't figure out any sane way to set a managed
> pref
> > in a browser test*.  Any advice here?  Is there an easy way of doing this?
> > 
> > *I know there's TestingPrefService, but that's not really compatible with
our
> > browser test structure, which sets up a real profile and pref service.
> 
> Since this is still better than the current complexity, I'll address this in a
> followup.  pastarmovj@, feel free to respond, and I'll clean it up if there's
a
> good solution. :)

Hey sorry I somehow missed this request. You can check how we set policies for
the policy browser tests here
https://cs.chromium.org/chromium/src/chrome/browser/policy/policy_browsertest...
I hope this can be helpful for mocking this state.

Powered by Google App Engine
This is Rietveld 408576698