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

Issue 1139643005: Extract ErrorConsole from ExtensionSystem. (Closed)

Created:
5 years, 7 months ago by juncai
Modified:
5 years, 6 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, not at google - send to devlin
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Extract ErrorConsole from ExtensionSystem. This patch removes error_console accessor from ExtensionSystem. It can be its own browser context keyed service. And it can be built by its new factory. BUG= Committed: https://crrev.com/60673b43ede9dc07633683d9176d113c647aa8da Cr-Commit-Position: refs/heads/master@{#329480}

Patch Set 1 #

Total comments: 6

Patch Set 2 : use ErrorConsole::Get, update year for copyright lines #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -51 lines) Patch
M chrome/browser/extensions/chrome_extension_web_contents_observer.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/error_console/error_console.h View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/extensions/error_console/error_console.cc View 2 chunks +2 lines, -1 line 0 comments Download
A chrome/browser/extensions/error_console/error_console_factory.h View 1 1 chunk +37 lines, -0 lines 0 comments Download
A + chrome/browser/extensions/error_console/error_console_factory.cc View 1 1 chunk +14 lines, -13 lines 0 comments Download
M chrome/browser/extensions/extension_system_impl.h View 3 chunks +0 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_system_impl.cc View 4 chunks +0 lines, -10 lines 0 comments Download
M chrome/browser/extensions/test_extension_system.h View 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/extensions/test_extension_system.cc View 3 chunks +0 lines, -6 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/browser/extension_system.h View 2 chunks +0 lines, -4 lines 0 comments Download
M extensions/browser/mock_extension_system.h View 1 chunk +0 lines, -1 line 0 comments Download
M extensions/browser/mock_extension_system.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M extensions/shell/browser/shell_extension_system.h View 1 chunk +0 lines, -1 line 0 comments Download
M extensions/shell/browser/shell_extension_system.cc View 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 11 (2 generated)
juncai
Please take a look at this patch.
5 years, 7 months ago (2015-05-12 17:48:41 UTC) #2
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1139643005/diff/1/chrome/browser/extensions/chrome_extension_web_contents_observer.cc File chrome/browser/extensions/chrome_extension_web_contents_observer.cc (right): https://codereview.chromium.org/1139643005/diff/1/chrome/browser/extensions/chrome_extension_web_contents_observer.cc#newcode64 chrome/browser/extensions/chrome_extension_web_contents_observer.cc:64: ErrorConsoleFactory::GetForBrowserContext(browser_context())->ReportError( Use ErrorConsole::Get instead of including error_console_factory.h. https://codereview.chromium.org/1139643005/diff/1/chrome/browser/extensions/error_console/error_console_factory.cc File ...
5 years, 7 months ago (2015-05-12 17:58:53 UTC) #3
juncai
https://codereview.chromium.org/1139643005/diff/1/chrome/browser/extensions/chrome_extension_web_contents_observer.cc File chrome/browser/extensions/chrome_extension_web_contents_observer.cc (right): https://codereview.chromium.org/1139643005/diff/1/chrome/browser/extensions/chrome_extension_web_contents_observer.cc#newcode64 chrome/browser/extensions/chrome_extension_web_contents_observer.cc:64: ErrorConsoleFactory::GetForBrowserContext(browser_context())->ReportError( On 2015/05/12 17:58:52, reillyg wrote: > Use ErrorConsole::Get ...
5 years, 7 months ago (2015-05-12 19:01:01 UTC) #4
Reilly Grant (use Gerrit)
lgtm
5 years, 7 months ago (2015-05-12 19:14:38 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1139643005/20001
5 years, 7 months ago (2015-05-12 19:16:46 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 7 months ago (2015-05-12 20:47:04 UTC) #8
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/60673b43ede9dc07633683d9176d113c647aa8da Cr-Commit-Position: refs/heads/master@{#329480}
5 years, 7 months ago (2015-05-12 20:48:59 UTC) #9
Devlin
On 2015/05/12 20:48:59, commit-bot: I haz the power wrote: > Patchset 2 (id:??) landed as ...
5 years, 6 months ago (2015-06-17 17:30:44 UTC) #10
Reilly Grant (use Gerrit)
5 years, 6 months ago (2015-06-17 17:51:27 UTC) #11
Message was sent while issue was closed.
On 2015/06/17 17:30:44, Devlin wrote:
> On 2015/05/12 20:48:59, commit-bot: I haz the power wrote:
> > Patchset 2 (id:??) landed as
> > https://crrev.com/60673b43ede9dc07633683d9176d113c647aa8da
> > Cr-Commit-Position: refs/heads/master@{#329480}
> 
> (Sorry to comment on a closed CL, but it looks like there was never a bug
> associated with it.)
> 
> I'm not sure I see the benefit of this.  Making things keyed services
*greatly*
> complicates the lifetime associated with them, adds its own set of boilerplate
> (the factory), and doesn't seem to have really gained us anything.  What was
the
> motivation for this and related patches?

By separating the large ExtensionSystem keyed service into smaller pieces we
make each a little more complex but in exchange we can reason about them
independently. This simplifies consumers of this code because they only need to
depend on the service that they need instead of a bundle of services that is
harder to initialize because it has deeper dependencies. The benefit is seen
most strongly in tests. Note that, aside from the addition of the factory class,
which I agree is sadly a bit of boilerplate, this patch is a net removal of
code.

Last time I worked on this people seemed to like this idea so I thought it would
be good for juncai@ to work on to explore the extensions system and some core
Chrome design patterns. It seems that that opinion has shifted and we aren't
working on this type of patch anymore. I apologize for the churn if that's all
you see this as.

Powered by Google App Engine
This is Rietveld 408576698