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

Side by Side Diff: components/nacl/zygote/nacl_fork_delegate_linux.h

Issue 308073002: Clear environment variables for nacl_helper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 COMPONENTS_NACL_ZYGOTE_NACL_FORK_DELEGATE_LINUX_H_ 5 #ifndef COMPONENTS_NACL_ZYGOTE_NACL_FORK_DELEGATE_LINUX_H_
6 #define COMPONENTS_NACL_ZYGOTE_NACL_FORK_DELEGATE_LINUX_H_ 6 #define COMPONENTS_NACL_ZYGOTE_NACL_FORK_DELEGATE_LINUX_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "content/public/common/zygote_fork_delegate_linux.h" 13 #include "content/public/common/zygote_fork_delegate_linux.h"
14 14
15 namespace base {
16 struct LaunchOptions;
17 }
18
15 template <typename> 19 template <typename>
16 class ScopedVector; 20 class ScopedVector;
17 21
18 namespace nacl { 22 namespace nacl {
19 23
20 // Appends any ZygoteForkDelegate instances needed by NaCl to |*delegates|. 24 // Appends any ZygoteForkDelegate instances needed by NaCl to |*delegates|.
21 void AddNaClZygoteForkDelegates( 25 void AddNaClZygoteForkDelegates(
22 ScopedVector<content::ZygoteForkDelegate>* delegates); 26 ScopedVector<content::ZygoteForkDelegate>* delegates);
23 27
24 // The NaClForkDelegate is created during Chrome linux zygote 28 // The NaClForkDelegate is created during Chrome linux zygote
(...skipping 12 matching lines...) Expand all
37 int* uma_boundary_value) OVERRIDE; 41 int* uma_boundary_value) OVERRIDE;
38 virtual bool CanHelp(const std::string& process_type, std::string* uma_name, 42 virtual bool CanHelp(const std::string& process_type, std::string* uma_name,
39 int* uma_sample, int* uma_boundary_value) OVERRIDE; 43 int* uma_sample, int* uma_boundary_value) OVERRIDE;
40 virtual pid_t Fork(const std::string& process_type, 44 virtual pid_t Fork(const std::string& process_type,
41 const std::vector<int>& fds, 45 const std::vector<int>& fds,
42 const std::string& channel_id) OVERRIDE; 46 const std::string& channel_id) OVERRIDE;
43 virtual bool GetTerminationStatus(pid_t pid, bool known_dead, 47 virtual bool GetTerminationStatus(pid_t pid, bool known_dead,
44 base::TerminationStatus* status, 48 base::TerminationStatus* status,
45 int* exit_code) OVERRIDE; 49 int* exit_code) OVERRIDE;
46 50
51 static void AddPassthroughEnvToOptions(base::LaunchOptions& options);
jln (very slow on Chromium) 2014/06/02 21:31:47 Style: make this a pointer instead as it is non-co
elijahtaylor1 2014/06/03 20:47:54 Done.
52
47 private: 53 private:
48 // These values are reported via UMA and hence they become permanent 54 // These values are reported via UMA and hence they become permanent
49 // constants. Old values cannot be reused, only new ones added. 55 // constants. Old values cannot be reused, only new ones added.
50 enum NaClHelperStatus { 56 enum NaClHelperStatus {
51 kNaClHelperUnused = 0, 57 kNaClHelperUnused = 0,
52 kNaClHelperMissing = 1, 58 kNaClHelperMissing = 1,
53 kNaClHelperBootstrapMissing = 2, 59 kNaClHelperBootstrapMissing = 2,
54 kNaClHelperValgrind = 3, 60 kNaClHelperValgrind = 3,
55 kNaClHelperLaunchFailed = 4, 61 kNaClHelperLaunchFailed = 4,
56 kNaClHelperAckFailed = 5, 62 kNaClHelperAckFailed = 5,
57 kNaClHelperSuccess = 6, 63 kNaClHelperSuccess = 6,
58 kNaClHelperStatusBoundary // Must be one greater than highest value used. 64 kNaClHelperStatusBoundary // Must be one greater than highest value used.
59 }; 65 };
60 66
61 const bool nonsfi_mode_; 67 const bool nonsfi_mode_;
62 NaClHelperStatus status_; 68 NaClHelperStatus status_;
63 int fd_; 69 int fd_;
64 70
65 DISALLOW_COPY_AND_ASSIGN(NaClForkDelegate); 71 DISALLOW_COPY_AND_ASSIGN(NaClForkDelegate);
66 }; 72 };
67 73
68 } // namespace nacl 74 } // namespace nacl
69 75
70 #endif // COMPONENTS_NACL_ZYGOTE_NACL_FORK_DELEGATE_LINUX_H_ 76 #endif // COMPONENTS_NACL_ZYGOTE_NACL_FORK_DELEGATE_LINUX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698