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

Issue 1887253002: Rate limit programmatic update checks for extensions (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 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 Committed: https://crrev.com/52524d5ef1489926230064f7d40fa5dd315a1795 Cr-Commit-Position: refs/heads/master@{#388362}

Patch Set 1 #

Total comments: 22

Patch Set 2 : added debugging LOG statements to troubleshoot test failure on chromeos #

Patch Set 3 : more logging #

Patch Set 4 : revert logging, back to patchset 1 state #

Patch Set 5 : review comments, fixed chromeos bug #

Total comments: 2

Patch Set 6 : use vector::swap #

Patch Set 7 : fix for idleness waiting problem caused by crrev.com/388245 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+495 lines, -118 lines) Patch
M chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.h View 1 2 3 4 4 chunks +23 lines, -7 lines 0 comments Download
M chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc View 1 2 3 4 5 6 chunks +92 lines, -14 lines 0 comments Download
A chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate_unittest.cc View 1 2 3 4 5 6 1 chunk +317 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 5 6 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 2 3 4 5 6 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 3 4 chunks +14 lines, -0 lines 0 comments Download
A extensions/browser/updater/extension_downloader_test_delegate.h View 1 2 3 4 1 chunk +32 lines, -0 lines 0 comments Download
M extensions/extensions.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 18 (7 generated)
asargent_no_longer_on_chrome
4 years, 8 months ago (2016-04-14 22:28:28 UTC) #2
Devlin
mostly lg, but looks like it's failing on CrOS https://codereview.chromium.org/1887253002/diff/1/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/1887253002/diff/1/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc#newcode63 chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc:63: ...
4 years, 8 months ago (2016-04-15 17:57:38 UTC) #3
asargent_no_longer_on_chrome
comments addressed - please take another look https://codereview.chromium.org/1887253002/diff/1/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/1887253002/diff/1/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc#newcode63 chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc:63: const net::BackoffEntry::Policy ...
4 years, 8 months ago (2016-04-19 17:56:53 UTC) #4
Devlin
lgtm https://codereview.chromium.org/1887253002/diff/80001/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/1887253002/diff/80001/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc#newcode363 chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc:363: info.callbacks.clear(); nit: could we just do vector::swap() here?
4 years, 8 months ago (2016-04-19 19:55:19 UTC) #5
asargent_no_longer_on_chrome
https://codereview.chromium.org/1887253002/diff/80001/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/1887253002/diff/80001/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc#newcode363 chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc:363: info.callbacks.clear(); On 2016/04/19 19:55:19, Devlin wrote: > nit: could ...
4 years, 8 months ago (2016-04-19 20:50:50 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1887253002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1887253002/100001
4 years, 8 months ago (2016-04-19 20:51:35 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/174653) mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 8 months ago (2016-04-19 21:07:50 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1887253002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1887253002/120001
4 years, 8 months ago (2016-04-19 22:44:41 UTC) #14
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 8 months ago (2016-04-19 23:46:47 UTC) #15
msramek
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/1903713002/ by msramek@chromium.org. ...
4 years, 8 months ago (2016-04-20 08:18:21 UTC) #16
commit-bot: I haz the power
4 years, 8 months ago (2016-04-22 19:18:19 UTC) #18
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/52524d5ef1489926230064f7d40fa5dd315a1795
Cr-Commit-Position: refs/heads/master@{#388362}

Powered by Google App Engine
This is Rietveld 408576698