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

Issue 9317026: Hide WorkerProcessHost from chrome. (Closed)

Created:
8 years, 10 months ago by jam
Modified:
8 years, 10 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, yoshiki+watch_chromium.org
Visibility:
Public.

Description

Hide WorkerProcessHost from chrome. The code in chrome didn't need to know about all of WorkerProcessHost, which has many methods/getters especially counting WorkerInstance. Instead I added simple getters for the list of running workers, and the ability to terminate a worker. BUG=98716 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=120078

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 11

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+275 lines, -256 lines) Patch
M chrome/browser/DEPS View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.h View 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 2 chunks +20 lines, -44 lines 0 comments Download
M chrome/browser/debugger/devtools_sanity_unittest.cc View 1 2 3 5 chunks +23 lines, -43 lines 0 comments Download
M chrome/browser/notifications/desktop_notification_service.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/task_manager/task_manager_worker_resource_provider.h View 1 2 1 chunk +5 lines, -7 lines 0 comments Download
M chrome/browser/task_manager/task_manager_worker_resource_provider.cc View 1 2 12 chunks +43 lines, -39 lines 0 comments Download
M chrome/browser/ui/webui/workers_ui.cc View 5 chunks +35 lines, -37 lines 0 comments Download
M content/browser/debugger/worker_devtools_manager.h View 3 chunks +9 lines, -16 lines 0 comments Download
M content/browser/debugger/worker_devtools_manager.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M content/browser/mock_content_browser_client.h View 1 chunk +4 lines, -4 lines 0 comments Download
M content/browser/mock_content_browser_client.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M content/browser/worker_host/worker_process_host.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/worker_host/worker_process_host.cc View 1 2 3 5 chunks +26 lines, -3 lines 0 comments Download
M content/browser/worker_host/worker_service_impl.h View 2 chunks +2 lines, -3 lines 0 comments Download
M content/browser/worker_host/worker_service_impl.cc View 1 2 9 chunks +43 lines, -15 lines 0 comments Download
M content/public/browser/DEPS View 1 1 chunk +0 lines, -1 line 0 comments Download
M content/public/browser/content_browser_client.h View 3 chunks +15 lines, -13 lines 0 comments Download
M content/public/browser/worker_service.h View 1 2 2 chunks +21 lines, -1 line 0 comments Download
M content/public/browser/worker_service_observer.h View 1 chunk +9 lines, -10 lines 0 comments Download
M content/shell/shell_content_browser_client.h View 1 chunk +4 lines, -4 lines 0 comments Download
M content/shell/shell_content_browser_client.cc View 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
jam
8 years, 10 months ago (2012-02-01 02:09:38 UTC) #1
Andrew T Wilson (Slow)
Generally looks good. A few nits, and one potential bug, but LGTM after you resolve ...
8 years, 10 months ago (2012-02-01 05:51:36 UTC) #2
jam
8 years, 10 months ago (2012-02-01 16:53:53 UTC) #3
re reviewers, I'll keep that in mind for next time. this was sufficiently
straightforward change in that it shouldn't change functionality so I figure
multiple reviewers are not necessary

http://codereview.chromium.org/9317026/diff/7006/chrome/browser/chrome_conten...
File chrome/browser/chrome_content_browser_client.cc (right):

http://codereview.chromium.org/9317026/diff/7006/chrome/browser/chrome_conten...
chrome/browser/chrome_content_browser_client.cc:802: i->first, i->second, url,
name, display_name, !allow));
On 2012/02/01 05:51:37, Andrew T Wilson wrote:
> this line is indented one space too many

Done.

http://codereview.chromium.org/9317026/diff/7006/chrome/browser/chrome_conten...
chrome/browser/chrome_content_browser_client.cc:824: i->first, i->second, url,
!allow));
On 2012/02/01 05:51:37, Andrew T Wilson wrote:
> indent is off

Done.

http://codereview.chromium.org/9317026/diff/7006/chrome/browser/debugger/devt...
File chrome/browser/debugger/devtools_sanity_unittest.cc (right):

http://codereview.chromium.org/9317026/diff/7006/chrome/browser/debugger/devt...
chrome/browser/debugger/devtools_sanity_unittest.cc:363:
MessageLoop::QuitClosure());
On 2012/02/01 05:51:37, Andrew T Wilson wrote:
> The original code had a return statement in the loop. I actually don't think
we
> actually need a loop - just grab the first element? Or am I misreading this?

oops, thanks. took out loop

http://codereview.chromium.org/9317026/diff/7006/content/browser/worker_host/...
File content/browser/worker_host/worker_process_host.cc (right):

http://codereview.chromium.org/9317026/diff/7006/content/browser/worker_host/...
content/browser/worker_host/worker_process_host.cc:84:
std::vector<std::pair<int, int> > result;
On 2012/02/01 05:51:37, Andrew T Wilson wrote:
> How many copies of the vector does this end up creating? Is the compiler smart
> enough to avoid copying into the return value?

yep: see http://en.wikipedia.org/wiki/Return_value_optimization

> The alternative would be to pass
> in a vector*. Not a huge deal, though - I'm OK as-is since in general this is
a
> very small vector.
> 
> Is there a reason why this isn't a member function on WorkerProcessHost?

no reason. i'll just make it a member function

> 
> Also, can |process| be a const in-param?

http://codereview.chromium.org/9317026/diff/7006/content/public/browser/conte...
File content/public/browser/content_browser_client.h (right):

http://codereview.chromium.org/9317026/diff/7006/content/public/browser/conte...
content/public/browser/content_browser_client.h:200: // Allow the embedder to
control if access to file system by a shared worker
On 2012/02/01 05:51:37, Andrew T Wilson wrote:
> Is this really only for shared workers?

yeah, now that only shared workers run in a separate process (and so are hosted
by WorkerProcessHost)

Powered by Google App Engine
This is Rietveld 408576698