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

Side by Side Diff: content/utility/utility_main.cc

Issue 8414020: Expose the sandbox related code through the content API. I did a bit of cleanup while I was doing... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/system_monitor/system_monitor.h" 7 #include "base/system_monitor/system_monitor.h"
8 #include "base/threading/platform_thread.h" 8 #include "base/threading/platform_thread.h"
9 #include "content/common/child_process.h" 9 #include "content/common/child_process.h"
10 #include "content/common/hi_res_timer_manager.h" 10 #include "content/common/hi_res_timer_manager.h"
(...skipping 11 matching lines...) Expand all
22 MessageLoop main_message_loop; 22 MessageLoop main_message_loop;
23 base::PlatformThread::SetName("CrUtilityMain"); 23 base::PlatformThread::SetName("CrUtilityMain");
24 24
25 base::SystemMonitor system_monitor; 25 base::SystemMonitor system_monitor;
26 HighResolutionTimerManager hi_res_timer_manager; 26 HighResolutionTimerManager hi_res_timer_manager;
27 27
28 ChildProcess utility_process; 28 ChildProcess utility_process;
29 utility_process.set_main_thread(new UtilityThreadImpl()); 29 utility_process.set_main_thread(new UtilityThreadImpl());
30 30
31 #if defined(OS_WIN) 31 #if defined(OS_WIN)
32 bool no_sandbox = parameters.command_line_.HasSwitch(switches::kNoSandbox); 32 bool no_sandbox = parameters.command_line.HasSwitch(switches::kNoSandbox);
33 if (!no_sandbox) { 33 if (!no_sandbox) {
34 sandbox::TargetServices* target_services = 34 sandbox::TargetServices* target_services =
35 parameters.sandbox_info_.TargetServices(); 35 parameters.sandbox_info->target_services;
36 if (!target_services) 36 if (!target_services)
37 return false; 37 return false;
38 target_services->LowerToken(); 38 target_services->LowerToken();
39 } 39 }
40 #endif 40 #endif
41 41
42 MessageLoop::current()->Run(); 42 MessageLoop::current()->Run();
43 43
44 return 0; 44 return 0;
45 } 45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698