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

Side by Side Diff: base/zygote_manager.h

Issue 119289: Enable zygote manager by default. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « base/process_util_unittest.cc ('k') | base/zygote_manager.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) 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 #ifndef BASE_ZYGOTE_MANAGER_H_ 5 #ifndef BASE_ZYGOTE_MANAGER_H_
6 #define BASE_ZYGOTE_MANAGER_H_ 6 #define BASE_ZYGOTE_MANAGER_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(OS_LINUX) 10 #if defined(OS_LINUX)
(...skipping 11 matching lines...) Expand all
22 #include "base/time.h" 22 #include "base/time.h"
23 #include "base/process_util.h" // for file_handle_mapping_vector 23 #include "base/process_util.h" // for file_handle_mapping_vector
24 24
25 namespace base { 25 namespace base {
26 26
27 class ZygoteManager { 27 class ZygoteManager {
28 public: 28 public:
29 // The normal way to get a ZygoteManager is via this singleton factory. 29 // The normal way to get a ZygoteManager is via this singleton factory.
30 static ZygoteManager* Get(); 30 static ZygoteManager* Get();
31 31
32 ZygoteManager() : server_fd_(-1), client_fd_(-1), canary_fd_(-1), 32 ZygoteManager() :
33 lockfd_(-1) { 33 server_fd_(-1), client_fd_(-1), canary_fd_(-1), lockfd_(-1) {
34 } 34 }
35 35
36 ~ZygoteManager(); 36 ~ZygoteManager();
37 37
38 // Measure round trip time. Return true on success. 38 // Measure round trip time. Return true on success.
39 // Only used during testing. 39 // Only used during testing.
40 bool Ping(base::TimeDelta* delta); 40 bool Ping(base::TimeDelta* delta);
41 41
42 // Start the zygote manager. 42 // Start the zygote manager.
43 // Called only once, but returns many times. 43 // Called only once, but returns many times.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // server to open a file, as it might have been already 134 // server to open a file, as it might have been already
135 // opened before this client was forked. 135 // opened before this client was forked.
136 std::map<std::string, int> cached_fds_; 136 std::map<std::string, int> cached_fds_;
137 }; 137 };
138 138
139 } // namespace base 139 } // namespace base
140 140
141 #endif // defined(OS_LINUX) 141 #endif // defined(OS_LINUX)
142 142
143 #endif // BASE_ZYGOTE_MANAGER_H_ 143 #endif // BASE_ZYGOTE_MANAGER_H_
OLDNEW
« no previous file with comments | « base/process_util_unittest.cc ('k') | base/zygote_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698