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

Unified Diff: chrome/common/nacl_helper_linux.h

Issue 6995121: New NaCl zygote implementation 2 (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Follow #define conventions 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/nacl_helper_linux.h
diff --git a/chrome/common/nacl_helper_linux.h b/chrome/common/nacl_helper_linux.h
new file mode 100644
index 0000000000000000000000000000000000000000..bc2497a1c5a7af448a637dad2e8264fad720aaa8
--- /dev/null
+++ b/chrome/common/nacl_helper_linux.h
@@ -0,0 +1,27 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// A mini-zygote specifically for Native Client.
+
+#ifndef CHROME_COMMON_NACL_HELPER_LINUX_H_
+#define CHROME_COMMON_NACL_HELPER_LINUX_H_
+#pragma once
+
+#define kNaClHelperStartupAck "NACLHELPER_OK"
Evan Martin 2011/06/24 18:57:33 Why #define and not char[]? Why no comments?
Brad Chen 2011/06/25 22:14:51 I've added comments. The reason I'm not using the
+#define kNaClForkRequest "NACLFORK"
+// kNaClBrowserDescriptor and kNaClSandboxDescriptor must match
+// content/browser/zygote_main_linux.cc kBrowserDescriptor and
+// kMagicSandboxIPCDescriptor.
Evan Martin 2011/06/24 18:57:33 This will likely regress unless you either are ver
Brad Chen 2011/06/25 22:14:51 I will add better comments to this file. My first
+// We put the kNaClZygoteDescriptor on 3 together with the
+// kNaClBrowserDescriptor. They are never used at the same
+// time, and this prevents /dev/urandom from using the fd.
+#define kNaClBrowserDescriptor 3
+#define kNaClZygoteDescriptor 3
+#define kNaClSandboxDescriptor 5
+
+#define kNaClBrowserFDIndex 0
+#define kNaClDummyFDIndex 1
+#define kNaClParentFDIndex 2
+
+#endif // CHROME_COMMON_NACL_HELPER_LINUX_H_

Powered by Google App Engine
This is Rietveld 408576698