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

Issue 420543002: Declarative content scripts: Browser-side: per-extension shared memory regions (lazily loaded) (Closed)

Created:
6 years, 5 months ago by Mark Dittmer
Modified:
6 years, 4 months ago
Reviewers:
Jeffrey Yasskin, Devlin
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, not at google - send to devlin, Fady Samuel
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Declarative content scripts: Browser-side: per-extension shared memory regions (lazily loaded) BUG=377978 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289969

Patch Set 1 #

Patch Set 2 : Add better documentation, don't make unrelated changes to gyp files, and guard against unintended U… #

Patch Set 3 : Add RemoveScripts to UserScriptMasterManager #

Patch Set 4 : Simplify UserScriptMaster add/remove scripts interface #

Patch Set 5 : Added missing changes to extension systems #

Total comments: 27

Patch Set 6 : Refactor relationship between UserScriptMaster and its subclasses #

Total comments: 10

Patch Set 7 : Refactor UserScriptMaster into UserScriptLoader, managed by SharedUserScriptMaster and DeclarativeU… #

Total comments: 87

Patch Set 8 : Implement changes from code review comments #

Total comments: 40

Patch Set 9 : Another round of review comments addressed #

Total comments: 30

Patch Set 10 : Yet another round of review comments addressed #

Total comments: 9

Patch Set 11 : DCHECK xtn system ready; keep all added_scripts_; careful changed_extensions_ management #

Total comments: 6

Patch Set 12 : git rebase, fix nits, git cl format #

Patch Set 13 : Remove unnecessary whitespace changes #

Patch Set 14 : Correctly handle extension lookup failure in UserScriptLoader::UpdateExtensionsInfo #

Patch Set 15 : Fix bugs: 1. Erroneous AttemptLoad() in UserScriptLoader::Observe(); 2. StartLoad()'ing when there … #

Total comments: 4

Patch Set 16 : Fix to the fix: ScriptsMayHaveChanged() logic #

Total comments: 2

Patch Set 17 : Fix nit and rebase from master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+701 lines, -1233 lines) Patch
M chrome/browser/extensions/convert_user_script.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
A chrome/browser/extensions/declarative_user_script_master.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +66 lines, -0 lines 0 comments Download
A chrome/browser/extensions/declarative_user_script_master.cc View 1 2 3 4 5 6 7 8 9 1 chunk +52 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_incognito_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_startup_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/extensions/extension_system_impl.h View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +20 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_system_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +37 lines, -7 lines 0 comments Download
A chrome/browser/extensions/shared_user_script_master.h View 1 2 3 4 5 6 7 8 9 1 chunk +65 lines, -0 lines 0 comments Download
A chrome/browser/extensions/shared_user_script_master.cc View 1 2 3 4 5 6 7 8 9 1 chunk +56 lines, -0 lines 0 comments Download
M chrome/browser/extensions/test_extension_system.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/extensions/test_extension_system.cc View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -2 lines 0 comments Download
A + chrome/browser/extensions/user_script_loader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +69 lines, -38 lines 0 comments Download
A + chrome/browser/extensions/user_script_loader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 11 chunks +232 lines, -174 lines 0 comments Download
A + chrome/browser/extensions/user_script_loader_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 14 chunks +34 lines, -32 lines 0 comments Download
D chrome/browser/extensions/user_script_master.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -150 lines 0 comments Download
D chrome/browser/extensions/user_script_master.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -545 lines 0 comments Download
D chrome/browser/extensions/user_script_master_unittest.cc View 1 2 3 4 5 6 1 chunk +0 lines, -263 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 3 chunks +6 lines, -2 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 1 chunk +1 line, -1 line 0 comments Download
M extensions/browser/extension_system.h View 1 2 3 4 5 6 4 chunks +9 lines, -3 lines 0 comments Download
M extensions/browser/mock_extension_system.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +4 lines, -1 line 0 comments Download
M extensions/browser/mock_extension_system.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +7 lines, -1 line 0 comments Download
M extensions/common/user_script.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M extensions/common/user_script.cc View 1 1 chunk +7 lines, -0 lines 0 comments Download
M extensions/shell/browser/shell_extension_system.h View 1 2 3 4 5 6 3 chunks +6 lines, -1 line 0 comments Download
M extensions/shell/browser/shell_extension_system.cc View 1 2 3 4 5 6 2 chunks +7 lines, -1 line 0 comments Download

Messages

Total messages: 36 (0 generated)
Mark Dittmer
Ken, would you please review the small changes to extensions/common? Jeffrey, would you please review ...
6 years, 5 months ago (2014-07-24 21:06:20 UTC) #1
kenrb
On 2014/07/24 21:06:20, Mark Dittmer wrote: > Ken, would you please review the small changes ...
6 years, 5 months ago (2014-07-24 21:09:04 UTC) #2
Mark Dittmer
On 2014/07/24 21:09:04, kenrb wrote: > On 2014/07/24 21:06:20, Mark Dittmer wrote: > > Ken, ...
6 years, 5 months ago (2014-07-25 14:08:57 UTC) #3
Devlin
Got about halfway through, but I think that the UserScriptMaster class design can be a ...
6 years, 4 months ago (2014-07-30 21:20:39 UTC) #4
Mark Dittmer
Uploaded refactor of relationship between UserScriptMaster and its subclasses. https://codereview.chromium.org/420543002/diff/80001/chrome/browser/extensions/declarative_user_script_master.cc File chrome/browser/extensions/declarative_user_script_master.cc (right): https://codereview.chromium.org/420543002/diff/80001/chrome/browser/extensions/declarative_user_script_master.cc#newcode22 chrome/browser/extensions/declarative_user_script_master.cc:22: ...
6 years, 4 months ago (2014-07-31 18:37:33 UTC) #5
Devlin
Halfway through again. The refactor already looks a ton better, but I think we can ...
6 years, 4 months ago (2014-07-31 20:32:24 UTC) #6
Mark Dittmer
Refactor UserScriptMaster into UserScriptLoader, managed by SharedUserScriptMaster and DeclarativeUserScriptMaster. Also, using std::set<UserScript> instead of UserScriptList ...
6 years, 4 months ago (2014-08-04 01:18:17 UTC) #7
Devlin
This is *much* cleaner! Very nice! We should also add tests, though. https://codereview.chromium.org/420543002/diff/120001/chrome/browser/extensions/declarative_user_script_master.cc File chrome/browser/extensions/declarative_user_script_master.cc ...
6 years, 4 months ago (2014-08-04 18:33:27 UTC) #8
Mark Dittmer
Addressed all the latest comments. Added many code comments, got rid of UserScriptMasterManager, etc. https://codereview.chromium.org/420543002/diff/120001/chrome/browser/extensions/declarative_user_script_master.cc ...
6 years, 4 months ago (2014-08-05 20:33:20 UTC) #9
Devlin
https://codereview.chromium.org/420543002/diff/120001/chrome/browser/extensions/shared_user_script_master.cc File chrome/browser/extensions/shared_user_script_master.cc (right): https://codereview.chromium.org/420543002/diff/120001/chrome/browser/extensions/shared_user_script_master.cc#newcode50 chrome/browser/extensions/shared_user_script_master.cc:50: std::set<UserScript>& stored_scripts = scripts_metadata_[id]; On 2014/08/05 20:33:18, Mark Dittmer ...
6 years, 4 months ago (2014-08-05 21:47:28 UTC) #10
Mark Dittmer
Addressed outstanding comments. Only question back is whether or not UserScriptLoader should become an ExtensionRegistryObserver; ...
6 years, 4 months ago (2014-08-06 15:32:26 UTC) #11
Devlin
Getting close! https://codereview.chromium.org/420543002/diff/140001/chrome/browser/extensions/user_script_loader.cc File chrome/browser/extensions/user_script_loader.cc (right): https://codereview.chromium.org/420543002/diff/140001/chrome/browser/extensions/user_script_loader.cc#newcode558 chrome/browser/extensions/user_script_loader.cc:558: void UserScriptLoader::UpdateExtensionsInfo() { On 2014/08/06 15:32:25, Mark ...
6 years, 4 months ago (2014-08-06 15:59:26 UTC) #12
Mark Dittmer
Next round of comments addressed. Just one question posed about initialization order of Extension objects ...
6 years, 4 months ago (2014-08-06 22:08:19 UTC) #13
Devlin
https://codereview.chromium.org/420543002/diff/160001/chrome/browser/extensions/extension_system_impl.cc File chrome/browser/extensions/extension_system_impl.cc (right): https://codereview.chromium.org/420543002/diff/160001/chrome/browser/extensions/extension_system_impl.cc#newcode508 chrome/browser/extensions/extension_system_impl.cc:508: DeclarativeUserScriptMaster* master = NULL; On 2014/08/06 22:08:18, Mark Dittmer ...
6 years, 4 months ago (2014-08-07 15:46:32 UTC) #14
Mark Dittmer
Addressed latest round of comments: DCHECK xtn system ready; keep all added_scripts_; careful changed_extensions_ management. ...
6 years, 4 months ago (2014-08-11 14:08:05 UTC) #15
Devlin
LGTM after the nits are fixed. Not sure if Jeffrey wants to take a look, ...
6 years, 4 months ago (2014-08-11 20:36:37 UTC) #16
Jeffrey Yasskin
I'm happy to trust Devlin for this CL.
6 years, 4 months ago (2014-08-11 21:36:59 UTC) #17
Mark Dittmer
Fixed final nits and cleaned up whitespace noise. https://codereview.chromium.org/420543002/diff/200001/chrome/browser/extensions/declarative_user_script_master.h File chrome/browser/extensions/declarative_user_script_master.h (right): https://codereview.chromium.org/420543002/diff/200001/chrome/browser/extensions/declarative_user_script_master.h#newcode22 chrome/browser/extensions/declarative_user_script_master.h:22: // ...
6 years, 4 months ago (2014-08-12 17:08:54 UTC) #18
Mark Dittmer
The CQ bit was checked by markdittmer@chromium.org
6 years, 4 months ago (2014-08-12 17:09:08 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/markdittmer@chromium.org/420543002/240001
6 years, 4 months ago (2014-08-12 17:12:51 UTC) #20
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-12 21:58:49 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-12 22:42:17 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_swarming/builds/3459) mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_swarming/builds/2401)
6 years, 4 months ago (2014-08-12 22:42:18 UTC) #23
Mark Dittmer
Fixed bugs: 1. Erroneous AttemptLoad() in UserScriptLoader::Observe() 2. StartLoad()'ing when there are no scripts to ...
6 years, 4 months ago (2014-08-14 21:53:55 UTC) #24
Devlin
https://codereview.chromium.org/420543002/diff/280001/chrome/browser/extensions/user_script_loader.cc File chrome/browser/extensions/user_script_loader.cc (right): https://codereview.chromium.org/420543002/diff/280001/chrome/browser/extensions/user_script_loader.cc#newcode443 chrome/browser/extensions/user_script_loader.cc:443: if (extension_system_ready_) this looks wrong...why not is_loading()? https://codereview.chromium.org/420543002/diff/280001/chrome/browser/extensions/user_script_loader.h File ...
6 years, 4 months ago (2014-08-14 22:07:08 UTC) #25
Mark Dittmer
Fix nit and logic error in comments. https://codereview.chromium.org/420543002/diff/280001/chrome/browser/extensions/user_script_loader.cc File chrome/browser/extensions/user_script_loader.cc (right): https://codereview.chromium.org/420543002/diff/280001/chrome/browser/extensions/user_script_loader.cc#newcode443 chrome/browser/extensions/user_script_loader.cc:443: if (extension_system_ready_) ...
6 years, 4 months ago (2014-08-14 22:28:21 UTC) #26
Devlin
lgtm if bots are happy https://codereview.chromium.org/420543002/diff/300001/chrome/browser/extensions/user_script_loader.cc File chrome/browser/extensions/user_script_loader.cc (right): https://codereview.chromium.org/420543002/diff/300001/chrome/browser/extensions/user_script_loader.cc#newcode429 chrome/browser/extensions/user_script_loader.cc:429: return (added_scripts_.size() || // ...
6 years, 4 months ago (2014-08-14 22:34:00 UTC) #27
Mark Dittmer
Fix nit and rebase from master. Trying to commit... https://codereview.chromium.org/420543002/diff/300001/chrome/browser/extensions/user_script_loader.cc File chrome/browser/extensions/user_script_loader.cc (right): https://codereview.chromium.org/420543002/diff/300001/chrome/browser/extensions/user_script_loader.cc#newcode429 chrome/browser/extensions/user_script_loader.cc:429: ...
6 years, 4 months ago (2014-08-15 00:25:58 UTC) #28
Mark Dittmer
The CQ bit was checked by markdittmer@chromium.org
6 years, 4 months ago (2014-08-15 00:26:09 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/markdittmer@chromium.org/420543002/310001
6 years, 4 months ago (2014-08-15 00:28:15 UTC) #30
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-15 06:41:59 UTC) #31
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-15 06:47:34 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: android_aosp on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_aosp/builds/6337)
6 years, 4 months ago (2014-08-15 06:47:35 UTC) #33
Mark Dittmer
The CQ bit was checked by markdittmer@chromium.org
6 years, 4 months ago (2014-08-15 14:12:06 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/markdittmer@chromium.org/420543002/310001
6 years, 4 months ago (2014-08-15 14:14:30 UTC) #35
commit-bot: I haz the power
6 years, 4 months ago (2014-08-15 19:15:32 UTC) #36
Message was sent while issue was closed.
Committed patchset #17 (310001) as 289969

Powered by Google App Engine
This is Rietveld 408576698