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

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

Issue 7167017: Fix to bug 75303 (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Improved comment. Created 9 years, 6 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 | « no previous file | chrome/common/service_process_util_linux.cc » ('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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 if (version && memchr(service_data->service_process_version, '\0', 146 if (version && memchr(service_data->service_process_version, '\0',
147 sizeof(service_data->service_process_version))) 147 sizeof(service_data->service_process_version)))
148 *version = service_data->service_process_version; 148 *version = service_data->service_process_version;
149 if (pid) 149 if (pid)
150 *pid = service_data->service_process_pid; 150 *pid = service_data->service_process_pid;
151 return true; 151 return true;
152 } 152 }
153 return false; 153 return false;
154 } 154 }
155 155
156 // Gets the name of the service process IPC channel.
157 IPC::ChannelHandle GetServiceProcessChannel() {
158 return GetServiceProcessScopedVersionedName("_service_ipc");
159 }
160
161 #endif // !OS_MACOSX 156 #endif // !OS_MACOSX
162 157
163 ServiceProcessState::ServiceProcessState() : state_(NULL) { 158 ServiceProcessState::ServiceProcessState() : state_(NULL) {
164 CreateAutoRunCommandLine(); 159 CreateAutoRunCommandLine();
165 CreateState(); 160 CreateState();
166 } 161 }
167 162
168 ServiceProcessState::~ServiceProcessState() { 163 ServiceProcessState::~ServiceProcessState() {
169 #if !defined(OS_MACOSX) 164 #if !defined(OS_MACOSX)
170 if (shared_mem_service_data_.get()) { 165 if (shared_mem_service_data_.get()) {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 262
268 // The user data directory is the only other flag we currently want to 263 // The user data directory is the only other flag we currently want to
269 // possibly store. 264 // possibly store.
270 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); 265 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
271 FilePath user_data_dir = 266 FilePath user_data_dir =
272 browser_command_line.GetSwitchValuePath(switches::kUserDataDir); 267 browser_command_line.GetSwitchValuePath(switches::kUserDataDir);
273 if (!user_data_dir.empty()) 268 if (!user_data_dir.empty())
274 autorun_command_line_->AppendSwitchPath(switches::kUserDataDir, 269 autorun_command_line_->AppendSwitchPath(switches::kUserDataDir,
275 user_data_dir); 270 user_data_dir);
276 } 271 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/service_process_util_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698