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

Issue 599310 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

Decrease Allowed Rate of Programmatic Update Checks For Extensions

Project Member Reported by mevissen@chromium.org, Mar 31 2016

Issue description

Extension developers can trigger update checks from js, via chrome.runtime.requestUpdateCheck(). Throttling on this API is 1 per 5s, so an extension can in principle check for updates 17k times per day per user; we have detected one extension that triggers 700 million checks per day across their userbase, which is a lot.

Original feature request:  Issue 88945 

Antony says:

I'll update the documentation to strongly suggest that developers *not* use the API except in very limited circumstances:

1) When they have something like a backend server component and they've actually determined via eg an XHR that there should be a new client version available (and even then, they still shouldn't use this unless it's really critical that all clients all use the new version; eg something like a multiplayer game)
2) As a result of a user action, eg in something like a "report bug" UI where they have the user click a button to check that they are running the latest version

John says:

I propose, then, that we limit to one programmatic on-demand check until the next background update check or until the next browser restart or extension reload after update. The user should be allowed to check via the developer-check button on the extensions page without restriction.

 
Summary: Decrease Allowed Rate of Programmatic Update Checks For Extensions (was: Decrase Allowed Rate of Programmatic Update Checks For Extensions)
Status: Started (was: Untriaged)
CL implementing this is out for review: https://codereview.chromium.org/1887253002/

Project Member

Comment 3 by bugdroid1@chromium.org, Apr 19 2016

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

commit 52524d5ef1489926230064f7d40fa5dd315a1795
Author: asargent <asargent@chromium.org>
Date: Tue Apr 19 23:46:38 2016

Rate limit programmatic update checks for extensions

Previously extensions could call the runtime.requestUpdateCheck method
as often as every 5 seconds. This CL introduces a more restrictive
policy of around one extra check per autoupdate period, and changes the
implementation location of the rate limiting from within the
ExtensionUpdater code itself to the ChromeRuntimeAPIDelegate, and makes
it more flexible by using net::BackoffEntry.

BUG= 599310 

Review URL: https://codereview.chromium.org/1887253002

Cr-Commit-Position: refs/heads/master@{#388362}

[modify] https://crrev.com/52524d5ef1489926230064f7d40fa5dd315a1795/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
[modify] https://crrev.com/52524d5ef1489926230064f7d40fa5dd315a1795/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.h
[add] https://crrev.com/52524d5ef1489926230064f7d40fa5dd315a1795/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate_unittest.cc
[modify] https://crrev.com/52524d5ef1489926230064f7d40fa5dd315a1795/chrome/browser/extensions/extension_service.cc
[modify] https://crrev.com/52524d5ef1489926230064f7d40fa5dd315a1795/chrome/browser/extensions/updater/extension_updater.cc
[modify] https://crrev.com/52524d5ef1489926230064f7d40fa5dd315a1795/chrome/browser/extensions/updater/extension_updater.h
[modify] https://crrev.com/52524d5ef1489926230064f7d40fa5dd315a1795/chrome/chrome_tests_unit.gypi
[modify] https://crrev.com/52524d5ef1489926230064f7d40fa5dd315a1795/extensions/browser/event_router.h
[modify] https://crrev.com/52524d5ef1489926230064f7d40fa5dd315a1795/extensions/browser/updater/extension_downloader.cc
[modify] https://crrev.com/52524d5ef1489926230064f7d40fa5dd315a1795/extensions/browser/updater/extension_downloader.h
[add] https://crrev.com/52524d5ef1489926230064f7d40fa5dd315a1795/extensions/browser/updater/extension_downloader_test_delegate.h
[modify] https://crrev.com/52524d5ef1489926230064f7d40fa5dd315a1795/extensions/extensions.gypi

Project Member

Comment 4 by bugdroid1@chromium.org, Apr 20 2016

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

commit f420bc5e1085bf754adfa8fb15ab755866e03227
Author: msramek <msramek@chromium.org>
Date: Wed Apr 20 08:19:34 2016

Revert of Rate limit programmatic update checks for extensions (patchset #7 id:120001 of https://codereview.chromium.org/1887253002/ )

Reason for revert:
This CL is suspected by sheriff-o-matic to have caused the perf regression in the number of static initializers.

See  crbug.com/605017  for more details.

Original issue's description:
> Rate limit programmatic update checks for extensions
>
> Previously extensions could call the runtime.requestUpdateCheck method
> as often as every 5 seconds. This CL introduces a more restrictive
> policy of around one extra check per autoupdate period, and changes the
> implementation location of the rate limiting from within the
> ExtensionUpdater code itself to the ChromeRuntimeAPIDelegate, and makes
> it more flexible by using net::BackoffEntry.
>
> BUG= 599310 

TBR=rdevlin.cronin@chromium.org,asargent@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 599310 , 605017 

Review URL: https://codereview.chromium.org/1903713002

Cr-Commit-Position: refs/heads/master@{#388444}

[modify] https://crrev.com/f420bc5e1085bf754adfa8fb15ab755866e03227/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
[modify] https://crrev.com/f420bc5e1085bf754adfa8fb15ab755866e03227/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.h
[delete] https://crrev.com/e4b98e2d9ff4fceae0d515d5795e677ff4518223/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate_unittest.cc
[modify] https://crrev.com/f420bc5e1085bf754adfa8fb15ab755866e03227/chrome/browser/extensions/extension_service.cc
[modify] https://crrev.com/f420bc5e1085bf754adfa8fb15ab755866e03227/chrome/browser/extensions/updater/extension_updater.cc
[modify] https://crrev.com/f420bc5e1085bf754adfa8fb15ab755866e03227/chrome/browser/extensions/updater/extension_updater.h
[modify] https://crrev.com/f420bc5e1085bf754adfa8fb15ab755866e03227/chrome/chrome_tests_unit.gypi
[modify] https://crrev.com/f420bc5e1085bf754adfa8fb15ab755866e03227/extensions/browser/event_router.h
[modify] https://crrev.com/f420bc5e1085bf754adfa8fb15ab755866e03227/extensions/browser/updater/extension_downloader.cc
[modify] https://crrev.com/f420bc5e1085bf754adfa8fb15ab755866e03227/extensions/browser/updater/extension_downloader.h
[delete] https://crrev.com/e4b98e2d9ff4fceae0d515d5795e677ff4518223/extensions/browser/updater/extension_downloader_test_delegate.h
[modify] https://crrev.com/f420bc5e1085bf754adfa8fb15ab755866e03227/extensions/extensions.gypi

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 21 2016

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

commit d50b18c369e5caf46c15c579ccbb28d7dcf84c2c
Author: asargent <asargent@chromium.org>
Date: Thu Apr 21 01:17:16 2016

Rate limit programmatic update checks for extensions (reland)

Previously extensions could call the runtime.requestUpdateCheck method
as often as every 5 seconds. This CL introduces a more restrictive
policy of around one extra check per autoupdate period, and changes the
implementation location of the rate limiting from within the
ExtensionUpdater code itself to the ChromeRuntimeAPIDelegate, and makes
it more flexible by using net::BackoffEntry.

This is a reland of https://codereview.chromium.org/1887253002, with
the removal of a static initializer.

BUG= 599310 

Review URL: https://codereview.chromium.org/1897293005

Cr-Commit-Position: refs/heads/master@{#388654}

[modify] https://crrev.com/d50b18c369e5caf46c15c579ccbb28d7dcf84c2c/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
[modify] https://crrev.com/d50b18c369e5caf46c15c579ccbb28d7dcf84c2c/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.h
[add] https://crrev.com/d50b18c369e5caf46c15c579ccbb28d7dcf84c2c/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate_unittest.cc
[modify] https://crrev.com/d50b18c369e5caf46c15c579ccbb28d7dcf84c2c/chrome/browser/extensions/extension_service.cc
[modify] https://crrev.com/d50b18c369e5caf46c15c579ccbb28d7dcf84c2c/chrome/browser/extensions/updater/extension_updater.cc
[modify] https://crrev.com/d50b18c369e5caf46c15c579ccbb28d7dcf84c2c/chrome/browser/extensions/updater/extension_updater.h
[modify] https://crrev.com/d50b18c369e5caf46c15c579ccbb28d7dcf84c2c/chrome/chrome_tests_unit.gypi
[modify] https://crrev.com/d50b18c369e5caf46c15c579ccbb28d7dcf84c2c/extensions/browser/event_router.h
[modify] https://crrev.com/d50b18c369e5caf46c15c579ccbb28d7dcf84c2c/extensions/browser/updater/extension_downloader.cc
[modify] https://crrev.com/d50b18c369e5caf46c15c579ccbb28d7dcf84c2c/extensions/browser/updater/extension_downloader.h
[add] https://crrev.com/d50b18c369e5caf46c15c579ccbb28d7dcf84c2c/extensions/browser/updater/extension_downloader_test_delegate.h
[modify] https://crrev.com/d50b18c369e5caf46c15c579ccbb28d7dcf84c2c/extensions/extensions.gypi

Status: Fixed (was: Started)

Sign in to add a comment