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

Issue 15573003: New architecture of the activity logging: Policies for summarization (and compression) (Closed)

Created:
7 years, 7 months ago by dbabic
Modified:
7 years, 6 months ago
Reviewers:
felt, Matt Perry
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Activity is now logged through policies. Policies are a flexible mechanism for summarization of the log data. Each Policy object encapsulates storage (for instance, could be an SQLite database or just append logs), summarization (for instance, frequency counting of various API calls), and possibly compression. BUG=238256 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=206785

Patch Set 1 #

Patch Set 2 : Fixed compiler errors on different platforms (at least I hope so). #

Total comments: 60

Patch Set 3 : Addressed another batch of Adrienne's comments #

Patch Set 4 : Fixed buggy test #

Patch Set 5 : More fixes #

Patch Set 6 : Yet more fixes #

Patch Set 7 : A few more fixes :-( #

Total comments: 47

Patch Set 8 : Addressed Adrienne's new comments and fixed lint warnings. #

Patch Set 9 : Fixed a missing OVERRIDE. #

Patch Set 10 : Another iteration... #

Patch Set 11 : Removed virtual call from destructor #

Patch Set 12 : Wrote unit tests #

Patch Set 13 : Changed the thread running tests. #

Patch Set 14 : Fixing test failures #

Total comments: 2

Patch Set 15 : Addressed Adrienne's final comments. #

Total comments: 21

Patch Set 16 : Addressed Matt's comments. #

Patch Set 17 : Replaced stringstream with append, added a TODO. #

Patch Set 18 : Merged policies and ActivityLogPrivate. #

Patch Set 19 : Merge (partial, commented out redundant code, but haven't removed it). #

Patch Set 20 : Merge with master. #

Total comments: 37

Patch Set 21 : Adressed Matt and Adrienne's comments. #

Total comments: 6

Patch Set 22 : Fixed compilation error on Chrome OS, addressed Matt's final comments. #

Patch Set 23 : Another Chrome OS fix. #

Patch Set 24 : Commented out original cmnd line restoration. #

Patch Set 25 : Fixed policy initialization and dispatching of SetBatchModeForTesting." #

Patch Set 26 : Fixed a compilation error. #

Patch Set 27 : Uncommented the cmnd line restoration. #

Patch Set 28 : Fixed SEGV by removing the IsLogEnabled call from the constructor. #

Patch Set 29 : Changed the CALL in tests to lowercase. #

Patch Set 30 : Fixed browser test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1002 lines, -107 lines) Patch
M chrome/browser/extensions/activity_log/activity_log.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 5 chunks +25 lines, -45 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 14 chunks +103 lines, -61 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 chunk +1 line, -0 lines 0 comments Download
A chrome/browser/extensions/activity_log/activity_log_policy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +152 lines, -0 lines 0 comments Download
A chrome/browser/extensions/activity_log/activity_log_policy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +37 lines, -0 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 3 chunks +3 lines, -1 line 0 comments Download
A chrome/browser/extensions/activity_log/fullstream_ui_policy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +71 lines, -0 lines 0 comments Download
A chrome/browser/extensions/activity_log/fullstream_ui_policy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +222 lines, -0 lines 0 comments Download
A chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +148 lines, -0 lines 0 comments Download
A chrome/browser/extensions/activity_log/stream_noargs_ui_policy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +36 lines, -0 lines 0 comments Download
A chrome/browser/extensions/activity_log/stream_noargs_ui_policy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +44 lines, -0 lines 0 comments Download
A chrome/browser/extensions/activity_log/stream_noargs_ui_policy_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +152 lines, -0 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (0 generated)
dbabic
Hi, Seems like most tests are passing. I have a few more running, but it ...
7 years, 7 months ago (2013-05-22 18:12:06 UTC) #1
felt
Hey, I'm still going through this, but in the meantime, can you update the issue ...
7 years, 7 months ago (2013-05-22 19:55:46 UTC) #2
felt
Hi Domagoj, I'll take another pass after you make these changes. Could you also update ...
7 years, 7 months ago (2013-05-22 21:17:59 UTC) #3
dbabic
https://chromiumcodereview.appspot.com/15573003/diff/3001/chrome/browser/extensions/activity_log/activity_log.cc File chrome/browser/extensions/activity_log/activity_log.cc (right): https://chromiumcodereview.appspot.com/15573003/diff/3001/chrome/browser/extensions/activity_log/activity_log.cc#newcode267 chrome/browser/extensions/activity_log/activity_log.cc:267: if (!testing_mode_ && On 2013/05/22 19:55:46, felt wrote: > ...
7 years, 7 months ago (2013-05-23 01:35:04 UTC) #4
felt
Could you make the changes to the issue description & upload your new patchset? https://chromiumcodereview.appspot.com/15573003/diff/3001/chrome/browser/extensions/activity_log/activity_log.cc ...
7 years, 7 months ago (2013-05-23 04:20:01 UTC) #5
dbabic
Hi, I think I've addressed all your comments. It took me a while to debug ...
7 years, 7 months ago (2013-05-24 00:35:07 UTC) #6
felt
Hi Domagoj, a few more comments. Please ping me when you've uploaded the new policy ...
7 years, 7 months ago (2013-05-24 18:43:37 UTC) #7
felt
Another thing I missed: If you look on the right hand side of the patchset, ...
7 years, 7 months ago (2013-05-25 17:29:46 UTC) #8
dbabic
https://chromiumcodereview.appspot.com/15573003/diff/30001/chrome/browser/extensions/activity_log/activity_log.cc File chrome/browser/extensions/activity_log/activity_log.cc (right): https://chromiumcodereview.appspot.com/15573003/diff/30001/chrome/browser/extensions/activity_log/activity_log.cc#newcode132 chrome/browser/extensions/activity_log/activity_log.cc:132: switch (policy_type_) { On 2013/05/24 18:43:38, felt wrote: > ...
7 years, 6 months ago (2013-05-28 21:11:49 UTC) #9
felt
I think you missed the comments in fullstream_ui_policy.h, please make those changes as well as ...
7 years, 6 months ago (2013-05-29 03:41:15 UTC) #10
dbabic
https://chromiumcodereview.appspot.com/15573003/diff/30001/chrome/browser/extensions/activity_log/activity_log_policy.cc File chrome/browser/extensions/activity_log/activity_log_policy.cc (right): https://chromiumcodereview.appspot.com/15573003/diff/30001/chrome/browser/extensions/activity_log/activity_log_policy.cc#newcode24 chrome/browser/extensions/activity_log/activity_log_policy.cc:24: &ActivityLogPolicy::SaveState); On 2013/05/29 03:41:15, felt wrote: > Huh? The ...
7 years, 6 months ago (2013-05-29 18:41:40 UTC) #11
felt
One last change, other than the unit tests. Please e-mail me when the unit tests ...
7 years, 6 months ago (2013-05-29 19:12:29 UTC) #12
felt
https://codereview.chromium.org/15573003/diff/30001/chrome/browser/extensions/activity_log/activity_log_policy.cc File chrome/browser/extensions/activity_log/activity_log_policy.cc (right): https://codereview.chromium.org/15573003/diff/30001/chrome/browser/extensions/activity_log/activity_log_policy.cc#newcode24 chrome/browser/extensions/activity_log/activity_log_policy.cc:24: &ActivityLogPolicy::SaveState); Another thing that came to mind: when shutting ...
7 years, 6 months ago (2013-05-29 19:22:34 UTC) #13
dbabic
Please let me know whether we have converged on this. Thanks. Will start working on ...
7 years, 6 months ago (2013-05-29 20:12:26 UTC) #14
felt
https://chromiumcodereview.appspot.com/15573003/diff/30001/chrome/browser/extensions/activity_log/activity_log_policy.cc File chrome/browser/extensions/activity_log/activity_log_policy.cc (right): https://chromiumcodereview.appspot.com/15573003/diff/30001/chrome/browser/extensions/activity_log/activity_log_policy.cc#newcode24 chrome/browser/extensions/activity_log/activity_log_policy.cc:24: &ActivityLogPolicy::SaveState); Sounds good. In the past, there was an ...
7 years, 6 months ago (2013-05-29 21:05:36 UTC) #15
dbabic
Hi, I've written the tests. It took me a bit more than I expected (sorry!), ...
7 years, 6 months ago (2013-05-30 01:42:45 UTC) #16
felt
OK, done with my review for now. Please have mpcomplete@chromium review, and ask him for ...
7 years, 6 months ago (2013-05-30 03:36:34 UTC) #17
monikag
On 2013/05/30 03:36:34, felt wrote: > OK, done with my review for now. Please have ...
7 years, 6 months ago (2013-05-30 03:38:51 UTC) #18
felt
One quick note: the BUG= field needs to be a chrome bug, not a buganizer ...
7 years, 6 months ago (2013-05-30 15:49:37 UTC) #19
dbabic
Matt, Would you please be willing to review this diff? I would also like to ...
7 years, 6 months ago (2013-05-30 16:51:59 UTC) #20
dbabic
Matt, Please ignore the "patch apply" failures in the Patch Set 15, which differs only ...
7 years, 6 months ago (2013-05-30 17:41:50 UTC) #21
Matt Perry
https://chromiumcodereview.appspot.com/15573003/diff/94001/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc File chrome/browser/extensions/activity_log/fullstream_ui_policy.cc (right): https://chromiumcodereview.appspot.com/15573003/diff/94001/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc#newcode164 chrome/browser/extensions/activity_log/fullstream_ui_policy.cc:164: processed_args << arg; I doubt the efficiency of stringstream ...
7 years, 6 months ago (2013-05-30 18:55:32 UTC) #22
dbabic
Matt, Thank you for quick response. I've addressed all your comments, except for the one ...
7 years, 6 months ago (2013-05-30 21:51:25 UTC) #23
Matt Perry
https://chromiumcodereview.appspot.com/15573003/diff/94001/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc File chrome/browser/extensions/activity_log/fullstream_ui_policy.cc (right): https://chromiumcodereview.appspot.com/15573003/diff/94001/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc#newcode164 chrome/browser/extensions/activity_log/fullstream_ui_policy.cc:164: processed_args << arg; On 2013/05/30 21:51:25, dbabic wrote: > ...
7 years, 6 months ago (2013-05-30 22:00:27 UTC) #24
dbabic
https://chromiumcodereview.appspot.com/15573003/diff/94001/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc File chrome/browser/extensions/activity_log/fullstream_ui_policy.cc (right): https://chromiumcodereview.appspot.com/15573003/diff/94001/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc#newcode164 chrome/browser/extensions/activity_log/fullstream_ui_policy.cc:164: processed_args << arg; On 2013/05/30 22:00:27, Matt Perry wrote: ...
7 years, 6 months ago (2013-05-30 22:15:45 UTC) #25
Matt Perry
https://chromiumcodereview.appspot.com/15573003/diff/94001/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc File chrome/browser/extensions/activity_log/fullstream_ui_policy.cc (right): https://chromiumcodereview.appspot.com/15573003/diff/94001/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc#newcode164 chrome/browser/extensions/activity_log/fullstream_ui_policy.cc:164: processed_args << arg; On 2013/05/30 22:15:45, dbabic wrote: > ...
7 years, 6 months ago (2013-05-30 22:46:21 UTC) #26
dbabic
Addressed both (sstream -> append, TODO). Would you be willing to approve now? Thanks. -- ...
7 years, 6 months ago (2013-05-30 22:54:41 UTC) #27
dbabic
https://chromiumcodereview.appspot.com/15573003/diff/94001/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc File chrome/browser/extensions/activity_log/fullstream_ui_policy.cc (right): https://chromiumcodereview.appspot.com/15573003/diff/94001/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc#newcode164 chrome/browser/extensions/activity_log/fullstream_ui_policy.cc:164: processed_args << arg; On 2013/05/30 22:54:41, dbabic wrote: > ...
7 years, 6 months ago (2013-05-30 23:01:18 UTC) #28
dbabic
Hi, As we discussed, I waited until Adrienne's recent patches landed, and then merged the ...
7 years, 6 months ago (2013-06-13 17:05:58 UTC) #29
Matt Perry
https://codereview.chromium.org/15573003/diff/119001/chrome/browser/extensions/activity_log/activity_log.cc File chrome/browser/extensions/activity_log/activity_log.cc (right): https://codereview.chromium.org/15573003/diff/119001/chrome/browser/extensions/activity_log/activity_log.cc#newcode250 chrome/browser/extensions/activity_log/activity_log.cc:250: // */ merge junk https://codereview.chromium.org/15573003/diff/119001/chrome/browser/extensions/activity_log/activity_log_policy.h File chrome/browser/extensions/activity_log/activity_log_policy.h (right): https://codereview.chromium.org/15573003/diff/119001/chrome/browser/extensions/activity_log/activity_log_policy.h#newcode86 ...
7 years, 6 months ago (2013-06-13 18:23:22 UTC) #30
felt
Hi Domagoj, here's my first batch of comments. https://codereview.chromium.org/15573003/diff/119001/chrome/browser/extensions/activity_log/activity_log.cc File chrome/browser/extensions/activity_log/activity_log.cc (right): https://codereview.chromium.org/15573003/diff/119001/chrome/browser/extensions/activity_log/activity_log.cc#newcode172 chrome/browser/extensions/activity_log/activity_log.cc:172: // ...
7 years, 6 months ago (2013-06-13 18:52:01 UTC) #31
felt
Hi Domagoj, a few more requests. https://codereview.chromium.org/15573003/diff/119001/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc File chrome/browser/extensions/activity_log/fullstream_ui_policy.cc (right): https://codereview.chromium.org/15573003/diff/119001/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc#newcode55 chrome/browser/extensions/activity_log/fullstream_ui_policy.cc:55: dispatch_thread_ = BrowserThread::UI; ...
7 years, 6 months ago (2013-06-13 20:24:16 UTC) #32
dbabic
https://codereview.chromium.org/15573003/diff/119001/chrome/browser/extensions/activity_log/activity_log.cc File chrome/browser/extensions/activity_log/activity_log.cc (right): https://codereview.chromium.org/15573003/diff/119001/chrome/browser/extensions/activity_log/activity_log.cc#newcode172 chrome/browser/extensions/activity_log/activity_log.cc:172: // that require them. On 2013/06/13 18:52:02, felt wrote: ...
7 years, 6 months ago (2013-06-13 23:10:08 UTC) #33
Matt Perry
mostly LGTM, just a few style nits https://codereview.chromium.org/15573003/diff/132001/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc File chrome/browser/extensions/activity_log/fullstream_ui_policy.cc (right): https://codereview.chromium.org/15573003/diff/132001/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc#newcode98 chrome/browser/extensions/activity_log/fullstream_ui_policy.cc:98: std::string* processed_args) ...
7 years, 6 months ago (2013-06-13 23:16:14 UTC) #34
felt
https://codereview.chromium.org/15573003/diff/119001/chrome/browser/extensions/activity_log/activity_log.cc File chrome/browser/extensions/activity_log/activity_log.cc (right): https://codereview.chromium.org/15573003/diff/119001/chrome/browser/extensions/activity_log/activity_log.cc#newcode172 chrome/browser/extensions/activity_log/activity_log.cc:172: // that require them. Hmm... originally I had meant ...
7 years, 6 months ago (2013-06-13 23:23:35 UTC) #35
dbabic
https://codereview.chromium.org/15573003/diff/119001/chrome/browser/extensions/activity_log/activity_log.cc File chrome/browser/extensions/activity_log/activity_log.cc (right): https://codereview.chromium.org/15573003/diff/119001/chrome/browser/extensions/activity_log/activity_log.cc#newcode172 chrome/browser/extensions/activity_log/activity_log.cc:172: // that require them. On 2013/06/13 23:23:37, felt wrote: ...
7 years, 6 months ago (2013-06-14 00:30:37 UTC) #36
felt
https://codereview.chromium.org/15573003/diff/119001/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc File chrome/browser/extensions/activity_log/fullstream_ui_policy.cc (right): https://codereview.chromium.org/15573003/diff/119001/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc#newcode84 chrome/browser/extensions/activity_log/fullstream_ui_policy.cc:84: db_->SetBatchModeForTesting(false); I'm confused. Where is SetSaveStateOnRequestOnly dispatched on the ...
7 years, 6 months ago (2013-06-14 04:29:02 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dbabic@chromium.org/15573003/165001
7 years, 6 months ago (2013-06-14 20:33:48 UTC) #38
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=138682
7 years, 6 months ago (2013-06-14 21:02:44 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dbabic@chromium.org/15573003/185001
7 years, 6 months ago (2013-06-14 23:37:08 UTC) #40
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=51042
7 years, 6 months ago (2013-06-15 00:28:50 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dbabic@chromium.org/15573003/176003
7 years, 6 months ago (2013-06-15 00:35:28 UTC) #42
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=51066
7 years, 6 months ago (2013-06-15 02:47:32 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dbabic@chromium.org/15573003/205001
7 years, 6 months ago (2013-06-17 18:01:12 UTC) #44
commit-bot: I haz the power
7 years, 6 months ago (2013-06-17 20:12:42 UTC) #45
Message was sent while issue was closed.
Change committed as 206785

Powered by Google App Engine
This is Rietveld 408576698