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

Issue 408523005: Reland: Refactor code that defers extension background page loading (Closed)

Created:
6 years, 5 months ago by James Cook
Modified:
6 years, 5 months ago
Reviewers:
Yoyo Zhou
CC:
chromium-reviews, tfarina, extensions-reviews_chromium.org, chromium-apps-reviews_chromium.org
Project:
chromium
Visibility:
Public.

Description

Reland: Refactor code that defers extension background page loading src/extensions depends on chrome::NOTIFICATION_PROFILE_CREATED to support deferred loading of extension background pages when the profile isn't ready yet. This is a layering violation. * Remove Chrome concepts like "browser window ready" and "profile created" from ProcessManager. Introduce ProcessManagerDelegate with a general concept of deferring background page loading. * Consolidate all the tricky Chrome-specific background page loading rules into ChromeProcessManagerDelegate. This keeps all the rules in one place. Annotate each block of special case code with the bug that inspired it. * Extend unit test coverage for ProcessManager. This will make it easier to eliminate chrome::NOTIFICATION_PROFILE_DESTROYED in ProcessManager in a later CL. (Original CL https://codereview.chromium.org/381283002 broke valgrind bots because it was initializing left-over BrowserContextKeyedServices from tests running earlier in the same process.) BUG=392658 TEST=unit_tests ProcessManagerTest, browser_tests ProcessManagerBrowserTest, manual Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284593

Patch Set 1 #

Total comments: 1

Patch Set 2 : dependency inject ExtensionRegistry #

Total comments: 1

Patch Set 3 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+503 lines, -213 lines) Patch
M apps/shell/browser/shell_extensions_browser_client.h View 1 chunk +1 line, -4 lines 0 comments Download
M apps/shell/browser/shell_extensions_browser_client.cc View 1 chunk +3 lines, -8 lines 0 comments Download
M chrome/browser/extensions/chrome_extensions_browser_client.h View 3 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/extensions/chrome_extensions_browser_client.cc View 3 chunks +7 lines, -26 lines 0 comments Download
M chrome/browser/extensions/chrome_notification_observer.h View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/chrome_notification_observer.cc View 2 chunks +0 lines, -43 lines 0 comments Download
A chrome/browser/extensions/chrome_process_manager_delegate.h View 1 chunk +50 lines, -0 lines 0 comments Download
A chrome/browser/extensions/chrome_process_manager_delegate.cc View 1 chunk +143 lines, -0 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/DEPS View 2 chunks +2 lines, -1 line 0 comments Download
M extensions/browser/extension_registry.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/browser/extensions_browser_client.h View 2 chunks +4 lines, -6 lines 0 comments Download
M extensions/browser/lazy_background_task_queue_unittest.cc View 1 2 chunks +4 lines, -1 line 0 comments Download
M extensions/browser/process_manager.h View 1 7 chunks +29 lines, -14 lines 0 comments Download
M extensions/browser/process_manager.cc View 1 18 chunks +77 lines, -82 lines 0 comments Download
A extensions/browser/process_manager_delegate.h View 1 chunk +34 lines, -0 lines 0 comments Download
M extensions/browser/process_manager_unittest.cc View 1 2 8 chunks +123 lines, -8 lines 0 comments Download
M extensions/browser/test_extensions_browser_client.h View 3 chunks +9 lines, -5 lines 0 comments Download
M extensions/browser/test_extensions_browser_client.cc View 2 chunks +6 lines, -9 lines 0 comments Download
M extensions/extensions.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
James Cook
yoz, please take another look. The differences between patchset 1 and 2 is the dependency ...
6 years, 5 months ago (2014-07-19 00:19:47 UTC) #1
Yoyo Zhou
LGTM https://chromiumcodereview.appspot.com/408523005/diff/20001/extensions/browser/lazy_background_task_queue_unittest.cc File extensions/browser/lazy_background_task_queue_unittest.cc (right): https://chromiumcodereview.appspot.com/408523005/diff/20001/extensions/browser/lazy_background_task_queue_unittest.cc#newcode28 extensions/browser/lazy_background_task_queue_unittest.cc:28: ExtensionRegistry::Get(profile)), I was a bit taken aback here, ...
6 years, 5 months ago (2014-07-21 22:34:51 UTC) #2
James Cook
The CQ bit was checked by jamescook@chromium.org
6 years, 5 months ago (2014-07-21 22:54:52 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamescook@chromium.org/408523005/40001
6 years, 5 months ago (2014-07-21 22:56:45 UTC) #4
commit-bot: I haz the power
6 years, 5 months ago (2014-07-22 02:13:58 UTC) #5
Message was sent while issue was closed.
Change committed as 284593

Powered by Google App Engine
This is Rietveld 408576698