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

Issue 2372223003: [Extensions] Fix incorrect counting prefs in activity log (Closed)

Created:
4 years, 2 months ago by Devlin
Modified:
4 years, 2 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, felt, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Extensions] Fix incorrect counting prefs in activity log The ActivityLog maintains a count of active apps/extensions that are listening to the API. This is necessary so that events that happen on startup (potentially before the extension is loaded) are properly recorded. Unfortunately, there was a bug where this counter was never properly decremented. Because of this, there are cases where we are recording activity, but there are no active consumers. Fix this by separating the concept of cached consumers and seen active consumers. During startup, we can rely on the cached consumer count, but once startup is complete, we check whether or not there is actually a consumer and update the cached count appropriately. BUG=646853 Committed: https://crrev.com/100d164a4403d22bfa238607ebad71331e5032ad Cr-Commit-Position: refs/heads/master@{#421870}

Patch Set 1 #

Patch Set 2 : testspass #

Patch Set 3 : woot #

Total comments: 2

Patch Set 4 : nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -59 lines) Patch
M chrome/browser/extensions/activity_log/activity_log.h View 1 2 6 chunks +24 lines, -5 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log.cc View 1 2 3 11 chunks +71 lines, -51 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log_enabled_unittest.cc View 1 2 2 chunks +46 lines, -3 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log_unittest.cc View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (18 generated)
Devlin
asargent@ and felt@, mind taking a look?
4 years, 2 months ago (2016-09-27 21:49:20 UTC) #11
asargent_no_longer_on_chrome
lgtm https://codereview.chromium.org/2372223003/diff/40001/chrome/browser/extensions/activity_log/activity_log.cc File chrome/browser/extensions/activity_log/activity_log.cc (right): https://codereview.chromium.org/2372223003/diff/40001/chrome/browser/extensions/activity_log/activity_log.cc#newcode666 chrome/browser/extensions/activity_log/activity_log.cc:666: nit: collapse double-newline to just one
4 years, 2 months ago (2016-09-27 22:54:07 UTC) #12
felt
lgtm
4 years, 2 months ago (2016-09-29 16:55:01 UTC) #13
Devlin
https://codereview.chromium.org/2372223003/diff/40001/chrome/browser/extensions/activity_log/activity_log.cc File chrome/browser/extensions/activity_log/activity_log.cc (right): https://codereview.chromium.org/2372223003/diff/40001/chrome/browser/extensions/activity_log/activity_log.cc#newcode666 chrome/browser/extensions/activity_log/activity_log.cc:666: On 2016/09/27 22:54:07, Antony Sargent wrote: > nit: collapse ...
4 years, 2 months ago (2016-09-29 17:59:42 UTC) #18
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/2372223003/60001
4 years, 2 months ago (2016-09-29 18:00:32 UTC) #21
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 2 months ago (2016-09-29 18:07:10 UTC) #23
commit-bot: I haz the power
4 years, 2 months ago (2016-09-29 18:11:13 UTC) #25
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/100d164a4403d22bfa238607ebad71331e5032ad
Cr-Commit-Position: refs/heads/master@{#421870}

Powered by Google App Engine
This is Rietveld 408576698