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

Issue 18660004: Extension activity log database refactoring (step 1) (Closed)

Created:
7 years, 5 months ago by mvrable
Modified:
7 years, 5 months ago
Reviewers:
felt, Matt Perry
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@incognito-tests
Visibility:
Public.

Description

Extension activity log database refactoring (step 1) This is the first of several patches to refactor the activity log database, policy, and make changes to the database schema. We move control over the database schema to the activity log policy, since different policies might need different database layouts for whatever summarization is implemented. Schema setup is implemented by a call from the ActivityDatabase back into the policy object. Possible callbacks are made explicit in the ActivityPolicyCallbacks interface; in the future there will be additional callbacks related to writing actions to the database. The lifetime of the policy objects is tied to the ActivityDatabase object. The table layout is not currently changed and code for creating the tables is still in the Action classes; that will be changed in a future patch. BUG=255730 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=211234

Patch Set 1 #

Patch Set 2 : Change lifetime management for policies #

Total comments: 26

Patch Set 3 : Updates for reviewer comments #

Patch Set 4 : Cleanup #

Total comments: 1

Patch Set 5 : Allow changing policies at runtime (for tests) #

Patch Set 6 : Fix potential null pointer dereference #

Total comments: 6

Patch Set 7 : Delegate renaming and comment cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+190 lines, -100 lines) Patch
M chrome/browser/extensions/activity_log/activity_database.h View 1 2 3 4 5 6 2 chunks +66 lines, -9 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_database.cc View 1 2 3 4 5 6 3 chunks +7 lines, -12 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_database_unittest.cc View 1 2 3 4 5 6 11 chunks +41 lines, -25 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log.h View 1 2 3 4 5 6 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/extensions/activity_log/activity_log.cc View 1 2 3 4 5 2 chunks +13 lines, -3 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log_policy.h View 1 2 3 4 5 6 5 chunks +12 lines, -12 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log_policy.cc View 1 2 1 chunk +0 lines, -9 lines 0 comments Download
M chrome/browser/extensions/activity_log/fullstream_ui_policy.h View 1 2 3 4 5 6 3 chunks +16 lines, -13 lines 0 comments Download
M chrome/browser/extensions/activity_log/fullstream_ui_policy.cc View 1 2 3 4 5 6 2 chunks +17 lines, -7 lines 0 comments Download
M chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc View 1 4 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/extensions/activity_log/stream_noargs_ui_policy_unittest.cc View 1 4 chunks +7 lines, -6 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
mvrable
This is the first step of the database refactoring patches, could you review?
7 years, 5 months ago (2013-07-09 17:56:22 UTC) #1
mvrable
The patch is updated; I also have a couple of questions about what the interface ...
7 years, 5 months ago (2013-07-09 21:41:02 UTC) #2
felt
https://codereview.chromium.org/18660004/diff/3001/chrome/browser/extensions/activity_log/activity_database.cc File chrome/browser/extensions/activity_log/activity_database.cc (right): https://codereview.chromium.org/18660004/diff/3001/chrome/browser/extensions/activity_log/activity_database.cc#newcode211 chrome/browser/extensions/activity_log/activity_database.cc:211: RecordBatchedActions(); Is it going to be a problem to ...
7 years, 5 months ago (2013-07-09 22:14:51 UTC) #3
mvrable
Thanks for taking a look. I made some updates, and a few of your comments ...
7 years, 5 months ago (2013-07-09 23:03:22 UTC) #4
felt
Thanks Michael, a few more comments. https://codereview.chromium.org/18660004/diff/3001/chrome/browser/extensions/activity_log/activity_database.cc File chrome/browser/extensions/activity_log/activity_database.cc (right): https://codereview.chromium.org/18660004/diff/3001/chrome/browser/extensions/activity_log/activity_database.cc#newcode211 chrome/browser/extensions/activity_log/activity_database.cc:211: RecordBatchedActions(); OK, can ...
7 years, 5 months ago (2013-07-10 00:14:36 UTC) #5
mvrable
https://codereview.chromium.org/18660004/diff/3001/chrome/browser/extensions/activity_log/activity_database.cc File chrome/browser/extensions/activity_log/activity_database.cc (right): https://codereview.chromium.org/18660004/diff/3001/chrome/browser/extensions/activity_log/activity_database.cc#newcode211 chrome/browser/extensions/activity_log/activity_database.cc:211: RecordBatchedActions(); On 2013/07/10 00:14:36, felt wrote: > OK, can ...
7 years, 5 months ago (2013-07-10 17:49:17 UTC) #6
felt
https://codereview.chromium.org/18660004/diff/3001/chrome/browser/extensions/activity_log/activity_log.cc File chrome/browser/extensions/activity_log/activity_log.cc (right): https://codereview.chromium.org/18660004/diff/3001/chrome/browser/extensions/activity_log/activity_log.cc#newcode136 chrome/browser/extensions/activity_log/activity_log.cc:136: policy_->Close(); LogWithoutArguments should be triggering this code. You can ...
7 years, 5 months ago (2013-07-10 18:35:16 UTC) #7
mvrable
https://codereview.chromium.org/18660004/diff/3001/chrome/browser/extensions/activity_log/activity_log.cc File chrome/browser/extensions/activity_log/activity_log.cc (right): https://codereview.chromium.org/18660004/diff/3001/chrome/browser/extensions/activity_log/activity_log.cc#newcode136 chrome/browser/extensions/activity_log/activity_log.cc:136: policy_->Close(); On 2013/07/10 18:35:17, felt wrote: > LogWithoutArguments should ...
7 years, 5 months ago (2013-07-10 18:53:56 UTC) #8
mvrable
Another update, allowing policies to be switched for running tests. Adrienne, is this code looking ...
7 years, 5 months ago (2013-07-10 20:48:40 UTC) #9
felt
Yes, I'm happy with it now. Please mail Matt. I think your issue description does ...
7 years, 5 months ago (2013-07-10 20:51:55 UTC) #10
mvrable
Matt, This is the first in what will be a series of extension activity log ...
7 years, 5 months ago (2013-07-10 20:59:47 UTC) #11
Matt Perry
Some comments on the ownership graph would be helpful. From what I can tell, it's ...
7 years, 5 months ago (2013-07-10 23:19:29 UTC) #12
mvrable
I've made some updates based on your comments. The big changes are renaming ActivityDatabaseCallbacks to ...
7 years, 5 months ago (2013-07-11 17:30:33 UTC) #13
Matt Perry
lgtm
7 years, 5 months ago (2013-07-11 17:49:16 UTC) #14
felt
lgtm
7 years, 5 months ago (2013-07-11 18:59:25 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mvrable@chromium.org/18660004/46001
7 years, 5 months ago (2013-07-11 20:02:03 UTC) #16
commit-bot: I haz the power
7 years, 5 months ago (2013-07-11 22:26:51 UTC) #17
Message was sent while issue was closed.
Change committed as 211234

Powered by Google App Engine
This is Rietveld 408576698