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

Side by Side Diff: chrome/worker/worker_main.cc

Issue 27157: Initial checkin of the out of process worker implementation.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/worker/worker.vcproj ('k') | chrome/worker/worker_process.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/command_line.h"
6 #include "base/message_loop.h"
7 #include "base/string_util.h"
8 #include "base/system_monitor.h"
9 #include "chrome/common/chrome_constants.h"
10 #include "chrome/common/chrome_switches.h"
11 #include "chrome/common/logging_chrome.h"
12 #include "chrome/common/main_function_params.h"
13 #include "chrome/common/win_util.h"
14 #include "chrome/worker/worker_process.h"
15 #include "sandbox/src/sandbox.h"
16
17 // Mainline routine for running as the worker process.
18 int WorkerMain(const MainFunctionParams& parameters) {
19 const CommandLine& parsed_command_line = parameters.command_line_;
20
21 // The main thread of the render process.
22 MessageLoopForIO main_message_loop;
23 std::wstring app_name = chrome::kBrowserAppName;
24 PlatformThread::SetName(WideToASCII(app_name + L"_WorkerMain").c_str());
25
26 // Initialize the SystemMonitor
27 base::SystemMonitor::Start();
28
29 // TODO(jabdelmalek): refactor sandboxing code from renderer so that the
30 // workers are sandboxed.
31
32 WorkerProcess worker_process;
33
34 // Load the accelerator table from the browser executable and tell the
35 // message loop to use it when translating messages.
36 MessageLoop::current()->Run();
37
38 return 0;
39 }
OLDNEW
« no previous file with comments | « chrome/worker/worker.vcproj ('k') | chrome/worker/worker_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698