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

Issue 23907004: [Activity log] Make database writes in counting policy more robust (Closed)

Created:
7 years, 3 months ago by mvrable
Modified:
7 years, 3 months ago
Reviewers:
felt
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, felt, extensions-reviews_chromium.org, karenlees
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

[Activity log] Make database writes in counting policy more robust Rework the way that new actions are logged in the counting policy so that it properly handles the case where there are duplicate records that weren't properly coalesced. (Duplicate records could arise from clearing URL history, for example.) This comes at the cost of additional queries--an update always takes 2 queries, instead 1 or 2 as before. However, benchmarking shows the cost to be not much different (worst case was ~5% slower, other cases were indistinguishable or even a bit faster). BUG=279465 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=221860

Patch Set 1 #

Patch Set 2 : Add unit test #

Total comments: 2

Patch Set 3 : Update comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -36 lines) Patch
M chrome/browser/extensions/activity_log/counting_policy.h View 1 2 1 chunk +6 lines, -1 line 0 comments Download
M chrome/browser/extensions/activity_log/counting_policy.cc View 1 2 3 chunks +49 lines, -35 lines 0 comments Download
M chrome/browser/extensions/activity_log/counting_policy_unittest.cc View 1 2 chunks +49 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
mvrable
Adrienne, would you have a chance to review this change? This makes sure that counts ...
7 years, 3 months ago (2013-09-06 18:34:49 UTC) #1
felt
lgtm, with one request: Can you add some explanation of this as a method comment ...
7 years, 3 months ago (2013-09-06 20:53:57 UTC) #2
mvrable
This version should improve the comments. https://codereview.chromium.org/23907004/diff/3001/chrome/browser/extensions/activity_log/counting_policy.cc File chrome/browser/extensions/activity_log/counting_policy.cc (right): https://codereview.chromium.org/23907004/diff/3001/chrome/browser/extensions/activity_log/counting_policy.cc#newcode228 chrome/browser/extensions/activity_log/counting_policy.cc:228: " WHERE time ...
7 years, 3 months ago (2013-09-06 21:48:33 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mvrable@chromium.org/23907004/13001
7 years, 3 months ago (2013-09-06 21:50:52 UTC) #4
commit-bot: I haz the power
7 years, 3 months ago (2013-09-07 02:18:54 UTC) #5
Message was sent while issue was closed.
Change committed as 221860

Powered by Google App Engine
This is Rietveld 408576698