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

Side by Side Diff: chrome/browser/zygote_host_linux.cc

Issue 293013: Deprecate PathService::Get(..., wstring*) and use FilePath instead. (Closed)
Patch Set: Created 11 years, 2 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 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 "chrome/browser/zygote_host_linux.h" 5 #include "chrome/browser/zygote_host_linux.h"
6 6
7 #include <unistd.h> 7 #include <unistd.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 #include <sys/socket.h> 9 #include <sys/socket.h>
10 #include <sys/stat.h> 10 #include <sys/stat.h>
(...skipping 28 matching lines...) Expand all
39 if (value) 39 if (value)
40 setenv(saved_envvar, value, 1 /* overwrite */); 40 setenv(saved_envvar, value, 1 /* overwrite */);
41 else 41 else
42 unsetenv(saved_envvar); 42 unsetenv(saved_envvar);
43 43
44 free(saved_envvar); 44 free(saved_envvar);
45 } 45 }
46 } 46 }
47 47
48 ZygoteHost::ZygoteHost() { 48 ZygoteHost::ZygoteHost() {
49 std::wstring chrome_path; 49 FilePath chrome_path;
50 CHECK(PathService::Get(base::FILE_EXE, &chrome_path)); 50 CHECK(PathService::Get(base::FILE_EXE, &chrome_path));
51 CommandLine cmd_line(chrome_path); 51 CommandLine cmd_line(chrome_path);
52 52
53 cmd_line.AppendSwitchWithValue(switches::kProcessType, 53 cmd_line.AppendSwitchWithValue(switches::kProcessType,
54 switches::kZygoteProcess); 54 switches::kZygoteProcess);
55 55
56 int fds[2]; 56 int fds[2];
57 CHECK(socketpair(PF_UNIX, SOCK_SEQPACKET, 0, fds) == 0); 57 CHECK(socketpair(PF_UNIX, SOCK_SEQPACKET, 0, fds) == 0);
58 base::file_handle_mapping_vector fds_to_map; 58 base::file_handle_mapping_vector fds_to_map;
59 fds_to_map.push_back(std::make_pair(fds[1], 3)); 59 fds_to_map.push_back(std::make_pair(fds[1], 3));
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 !read_pickle.ReadBool(&iter, &tmp_child_exited)) { 197 !read_pickle.ReadBool(&iter, &tmp_child_exited)) {
198 LOG(WARNING) << "Error parsing DidProcessCrash response from zygote."; 198 LOG(WARNING) << "Error parsing DidProcessCrash response from zygote.";
199 return false; 199 return false;
200 } 200 }
201 201
202 if (child_exited) 202 if (child_exited)
203 *child_exited = tmp_child_exited; 203 *child_exited = tmp_child_exited;
204 204
205 return did_crash; 205 return did_crash;
206 } 206 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698