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

Issue 19690003: Extension activity log database refactoring (step 3) (Closed)

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

Description

Extension activity log database refactoring (step 3) This is a continuation of work in https://codereview.chromium.org/18660004/ and https://codereview.chromium.org/19234003/. Flatten the Extension::Action hierarchy, getting rid of all subclasses and keeping just the top class. The new Action class has a number of data fields (some optional), so any of the old extension actions can be encoded into it. It maps in a straightforward fashion onto the current database schema. Change all the old sites that used specific Action subclasses to use the new version, and fix up unit tests. The extension activity log private API will be updated soon (by felt) to more closely match the new Action class. There is some basic compatibility in place so that the end-to-end tests still pass, but the private API unit tests have been disabled pending the rewrite. BUG=255730 TBR=jhawkins@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=213995

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 17

Patch Set 3 : Define string constants for Action objects; update comments #

Patch Set 4 : Put api_name in Action constructor #

Patch Set 5 : Compile fixes #

Total comments: 6

Patch Set 6 : Fix nits; add additional SQL error logging #

Patch Set 7 : [test] Database unit test debugging #

Patch Set 8 : [test] Fix uninitialized access #

Patch Set 9 : Do not set bad BlockedChromeActivityDetail::Reason values #

Patch Set 10 : Do not set bad BlockedChromeActivityDetail::Reason values #

Unified diffs Side-by-side diffs Delta from patch set Stats (+753 lines, -1335 lines) Patch
A chrome/browser/extensions/activity_log/activity_action_constants.h View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
A chrome/browser/extensions/activity_log/activity_action_constants.cc View 1 2 1 chunk +17 lines, -0 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_actions.h View 1 2 3 4 5 3 chunks +99 lines, -40 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_actions.cc View 1 2 3 4 5 6 7 8 9 3 chunks +310 lines, -28 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_database.h View 1 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_database.cc View 1 2 3 6 7 8 3 chunks +37 lines, -36 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_database_unittest.cc View 1 2 3 11 chunks +84 lines, -209 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log.h View 1 2 2 chunks +15 lines, -1 line 0 comments Download
M chrome/browser/extensions/activity_log/activity_log.cc View 1 2 3 7 chunks +66 lines, -116 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log_browsertest.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log_policy.h View 1 chunk +1 line, -7 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log_unittest.cc View 1 2 5 chunks +8 lines, -9 lines 0 comments Download
D chrome/browser/extensions/activity_log/api_actions.h View 1 chunk +0 lines, -78 lines 0 comments Download
D chrome/browser/extensions/activity_log/api_actions.cc View 1 chunk +0 lines, -257 lines 0 comments Download
D chrome/browser/extensions/activity_log/blocked_actions.h View 1 chunk +0 lines, -64 lines 0 comments Download
D chrome/browser/extensions/activity_log/blocked_actions.cc View 1 chunk +0 lines, -98 lines 0 comments Download
D chrome/browser/extensions/activity_log/dom_actions.h View 1 chunk +0 lines, -67 lines 0 comments Download
D chrome/browser/extensions/activity_log/dom_actions.cc View 1 1 chunk +0 lines, -151 lines 0 comments Download
M chrome/browser/extensions/activity_log/fullstream_ui_policy.h View 2 chunks +2 lines, -9 lines 0 comments Download
M chrome/browser/extensions/activity_log/fullstream_ui_policy.cc View 1 2 3 4 5 6 7 4 chunks +10 lines, -112 lines 0 comments Download
M chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc View 1 2 3 4 chunks +30 lines, -11 lines 0 comments Download
M chrome/browser/extensions/activity_log/stream_noargs_ui_policy.h View 2 chunks +2 lines, -5 lines 0 comments Download
M chrome/browser/extensions/activity_log/stream_noargs_ui_policy.cc View 1 chunk +9 lines, -8 lines 0 comments Download
M chrome/browser/extensions/activity_log/stream_noargs_ui_policy_unittest.cc View 1 2 3 4 chunks +30 lines, -11 lines 0 comments Download
M chrome/browser/extensions/api/activity_log_private/activity_log_private_api_unittest.cc View 1 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_function_dispatcher.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/chrome_render_message_filter.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 2 chunks +3 lines, -7 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
mvrable
This is the next step in the activity database refactoring work. Since the previous patch ...
7 years, 5 months ago (2013-07-17 22:17:46 UTC) #1
mvrable
Now that the previous patch has been committed I have rebased this to make it ...
7 years, 5 months ago (2013-07-18 22:45:31 UTC) #2
felt
A few questions about design choices, other than that it's looking good. https://codereview.chromium.org/19690003/diff/3001/chrome/browser/extensions/activity_log/activity_actions.h File chrome/browser/extensions/activity_log/activity_actions.h ...
7 years, 5 months ago (2013-07-23 17:07:17 UTC) #3
mvrable
Thanks for the good questions. I'm open to talking more about and changing the design ...
7 years, 5 months ago (2013-07-23 18:16:56 UTC) #4
felt
https://codereview.chromium.org/19690003/diff/3001/chrome/browser/extensions/activity_log/activity_actions.h File chrome/browser/extensions/activity_log/activity_actions.h (right): https://codereview.chromium.org/19690003/diff/3001/chrome/browser/extensions/activity_log/activity_actions.h#newcode57 chrome/browser/extensions/activity_log/activity_actions.h:57: void set_api_name(const std::string api_name) { api_name_ = api_name; } ...
7 years, 5 months ago (2013-07-23 19:06:32 UTC) #5
mvrable
https://codereview.chromium.org/19690003/diff/3001/chrome/browser/extensions/activity_log/activity_actions.h File chrome/browser/extensions/activity_log/activity_actions.h (right): https://codereview.chromium.org/19690003/diff/3001/chrome/browser/extensions/activity_log/activity_actions.h#newcode57 chrome/browser/extensions/activity_log/activity_actions.h:57: void set_api_name(const std::string api_name) { api_name_ = api_name; } ...
7 years, 5 months ago (2013-07-23 19:17:54 UTC) #6
felt
https://codereview.chromium.org/19690003/diff/3001/chrome/browser/extensions/activity_log/activity_log.h File chrome/browser/extensions/activity_log/activity_log.h (right): https://codereview.chromium.org/19690003/diff/3001/chrome/browser/extensions/activity_log/activity_log.h#newcode75 chrome/browser/extensions/activity_log/activity_log.h:75: void LogAction(scoped_refptr<Action> action); On 2013/07/23 19:17:55, mvrable wrote: > ...
7 years, 5 months ago (2013-07-23 19:22:33 UTC) #7
mvrable
The patch is updated so the api_name parameter is set in the constructor (every previous ...
7 years, 5 months ago (2013-07-23 21:54:03 UTC) #8
felt
On 2013/07/23 21:54:03, mvrable wrote: > The patch is updated so the api_name parameter is ...
7 years, 5 months ago (2013-07-23 21:57:07 UTC) #9
mvrable
Matt, This is the next of the activity log refactoring patches--this uses a single Action ...
7 years, 5 months ago (2013-07-24 04:17:49 UTC) #10
Matt Perry
lgtm https://codereview.chromium.org/19690003/diff/20001/chrome/browser/extensions/activity_log/activity_actions.cc File chrome/browser/extensions/activity_log/activity_actions.cc (right): https://codereview.chromium.org/19690003/diff/20001/chrome/browser/extensions/activity_log/activity_actions.cc#newcode36 chrome/browser/extensions/activity_log/activity_actions.cc:36: std::string GetURLForTabId(const int tab_id, Profile* profile) { nit: ...
7 years, 5 months ago (2013-07-24 21:06:28 UTC) #11
mvrable
https://codereview.chromium.org/19690003/diff/20001/chrome/browser/extensions/activity_log/activity_actions.cc File chrome/browser/extensions/activity_log/activity_actions.cc (right): https://codereview.chromium.org/19690003/diff/20001/chrome/browser/extensions/activity_log/activity_actions.cc#newcode36 chrome/browser/extensions/activity_log/activity_actions.cc:36: std::string GetURLForTabId(const int tab_id, Profile* profile) { On 2013/07/24 ...
7 years, 5 months ago (2013-07-25 00:08:42 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mvrable@chromium.org/19690003/74001
7 years, 5 months ago (2013-07-26 00:52:07 UTC) #13
mvrable
James, I just noticed that there is one file in this patch that needs you ...
7 years, 5 months ago (2013-07-26 04:04:50 UTC) #14
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=17255
7 years, 5 months ago (2013-07-26 06:19:09 UTC) #15
mvrable
On 2013/07/26 04:04:50, mvrable wrote: > James, > > I just noticed that there is ...
7 years, 5 months ago (2013-07-26 16:57:06 UTC) #16
James Hawkins
lgtm
7 years, 5 months ago (2013-07-26 16:59:42 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mvrable@chromium.org/19690003/74001
7 years, 5 months ago (2013-07-26 17:06:38 UTC) #18
commit-bot: I haz the power
7 years, 5 months ago (2013-07-26 22:53:40 UTC) #19
Message was sent while issue was closed.
Change committed as 213995

Powered by Google App Engine
This is Rietveld 408576698