Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Issue 1897293005: Rate limit programmatic update checks for extensions (reland) (Closed)

Created:
4 years, 8 months ago by asargent_no_longer_on_chrome
Modified:
4 years, 8 months ago
Reviewers:
Devlin
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/d50b18c369e5caf46c15c579ccbb28d7dcf84c2c Cr-Commit-Position: refs/heads/master@{#388654}

Patch Set 1 : Same as original #

Patch Set 2 : switch to LazyInstance for backoff policy #

Total comments: 2

Patch Set 3 : have Get() just return the net::BackoffEntry::Policy directly #

Unified diffs Side-by-side diffs Delta from patch set Stats (+524 lines, -118 lines) Patch
M chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.h View 4 chunks +23 lines, -7 lines 0 comments Download
M chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc View 1 2 6 chunks +121 lines, -14 lines 0 comments Download
A chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate_unittest.cc View 1 chunk +317 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/extensions/updater/extension_updater.h View 6 chunks +2 lines, -20 lines 0 comments Download
M chrome/browser/extensions/updater/extension_updater.cc View 6 chunks +2 lines, -72 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M extensions/browser/event_router.h View 1 chunk +2 lines, -2 lines 0 comments Download
M extensions/browser/updater/extension_downloader.h View 2 chunks +5 lines, -0 lines 0 comments Download
M extensions/browser/updater/extension_downloader.cc View 4 chunks +14 lines, -0 lines 0 comments Download
A extensions/browser/updater/extension_downloader_test_delegate.h View 1 chunk +32 lines, -0 lines 0 comments Download
M extensions/extensions.gypi View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 14 (6 generated)
asargent_no_longer_on_chrome
Devlin, can you take a look at this fix to my previous CL? It had ...
4 years, 8 months ago (2016-04-20 21:18:04 UTC) #2
Devlin
lgtm https://codereview.chromium.org/1897293005/diff/20001/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc File chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc (right): https://codereview.chromium.org/1897293005/diff/20001/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc#newcode75 chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc:75: const net::BackoffEntry::Policy* policy() { return &policy_; } nit: ...
4 years, 8 months ago (2016-04-20 22:09:31 UTC) #3
asargent_no_longer_on_chrome
https://codereview.chromium.org/1897293005/diff/20001/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc File chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc (right): https://codereview.chromium.org/1897293005/diff/20001/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc#newcode75 chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc:75: const net::BackoffEntry::Policy* policy() { return &policy_; } On 2016/04/20 ...
4 years, 8 months ago (2016-04-20 22:44:59 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1897293005/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1897293005/40001
4 years, 8 months ago (2016-04-20 22:45:41 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/215941)
4 years, 8 months ago (2016-04-20 23:50:38 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1897293005/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1897293005/40001
4 years, 8 months ago (2016-04-21 00:05:47 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 8 months ago (2016-04-21 01:17:26 UTC) #12
commit-bot: I haz the power
4 years, 8 months ago (2016-04-22 19:30:00 UTC) #14
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/d50b18c369e5caf46c15c579ccbb28d7dcf84c2c
Cr-Commit-Position: refs/heads/master@{#388654}

Powered by Google App Engine
This is Rietveld 408576698