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

Side by Side Diff: chrome/common/service_process_util.cc

Issue 7714018: Give plug-in processes an executable heap and disable PIE/ASLR for Native (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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/common/chrome_constants.cc ('k') | chrome/installer/mac/sign_app.sh.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/scoped_nsautorelease_pool.h" 10 #include "base/mac/scoped_nsautorelease_pool.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 return true; 245 return true;
246 } 246 }
247 247
248 IPC::ChannelHandle ServiceProcessState::GetServiceProcessChannel() { 248 IPC::ChannelHandle ServiceProcessState::GetServiceProcessChannel() {
249 return ::GetServiceProcessChannel(); 249 return ::GetServiceProcessChannel();
250 } 250 }
251 251
252 #endif // !OS_MACOSX 252 #endif // !OS_MACOSX
253 253
254 void ServiceProcessState::CreateAutoRunCommandLine() { 254 void ServiceProcessState::CreateAutoRunCommandLine() {
255 FilePath exe_path = ChildProcessHost::GetChildPath(false); 255 FilePath exe_path =
256 ChildProcessHost::GetChildPath(ChildProcessHost::CHILD_NORMAL);
256 if (exe_path.empty()) { 257 if (exe_path.empty()) {
257 NOTREACHED() << "Unable to get service process binary name."; 258 NOTREACHED() << "Unable to get service process binary name.";
258 } 259 }
259 autorun_command_line_.reset(new CommandLine(exe_path)); 260 autorun_command_line_.reset(new CommandLine(exe_path));
260 autorun_command_line_->AppendSwitchASCII(switches::kProcessType, 261 autorun_command_line_->AppendSwitchASCII(switches::kProcessType,
261 switches::kServiceProcess); 262 switches::kServiceProcess);
262 263
263 // The user data directory is the only other flag we currently want to 264 // The user data directory is the only other flag we currently want to
264 // possibly store. 265 // possibly store.
265 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); 266 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
266 FilePath user_data_dir = 267 FilePath user_data_dir =
267 browser_command_line.GetSwitchValuePath(switches::kUserDataDir); 268 browser_command_line.GetSwitchValuePath(switches::kUserDataDir);
268 if (!user_data_dir.empty()) 269 if (!user_data_dir.empty())
269 autorun_command_line_->AppendSwitchPath(switches::kUserDataDir, 270 autorun_command_line_->AppendSwitchPath(switches::kUserDataDir,
270 user_data_dir); 271 user_data_dir);
271 } 272 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_constants.cc ('k') | chrome/installer/mac/sign_app.sh.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698