summaryrefslogtreecommitdiffstats
path: root/base/shared_memory_unittest.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-29 03:44:44 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-29 03:44:44 +0000
commitbadf5cf5f14c65f6c799ef1fec77cde8351339c2 (patch)
tree83690887c035e4b457f00404f126f95ad1a90c06 /base/shared_memory_unittest.cc
parent8cc9738eff9c169487e8356947d88640659fc497 (diff)
downloadchromium_src-badf5cf5f14c65f6c799ef1fec77cde8351339c2.zip
chromium_src-badf5cf5f14c65f6c799ef1fec77cde8351339c2.tar.gz
chromium_src-badf5cf5f14c65f6c799ef1fec77cde8351339c2.tar.bz2
Expose the sandbox related code through the content API. I did a bit of cleanup while I was doing this.
-got rid of SandboxInitWrapper, since I didn't see a need to expose given that we can just expose sandbox::SandboxInterfaceInfo -got rid of the duplicated code to initialize the broker -since I made MainFunctionParams only have the sandbox struct on Windows, I also made the mac specific auto release pool behind an ifdef as well. It seemed odd to make something so mac specific compile on all platforms to save some #ifdefs. BUG=98716 Review URL: http://codereview.chromium.org/8414020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107863 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/shared_memory_unittest.cc')
-rw-r--r--base/shared_memory_unittest.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/base/shared_memory_unittest.cc b/base/shared_memory_unittest.cc
index 330add4..9f69a5d 100644
--- a/base/shared_memory_unittest.cc
+++ b/base/shared_memory_unittest.cc
@@ -3,7 +3,6 @@
// found in the LICENSE file.
#include "base/basictypes.h"
-#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/memory/scoped_ptr.h"
#include "base/shared_memory.h"
#include "base/test/multiprocess_test.h"
@@ -12,6 +11,10 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/multiprocess_func_list.h"
+#if defined(OS_MACOSX)
+#include "base/mac/scoped_nsautorelease_pool.h"
+#endif
+
static const int kNumThreads = 5;
static const int kNumTasks = 5;
@@ -34,7 +37,9 @@ class MultipleThreadMain : public PlatformThread::Delegate {
// PlatformThread::Delegate interface.
void ThreadMain() {
- mac::ScopedNSAutoreleasePool pool; // noop if not OSX
+#if defined(OS_MACOSX)
+ mac::ScopedNSAutoreleasePool pool;
+#endif
const uint32 kDataSize = 1024;
SharedMemory memory;
bool rv = memory.CreateNamed(s_test_name_, true, kDataSize);
@@ -339,7 +344,9 @@ class SharedMemoryProcessTest : public MultiProcessTest {
static int TaskTestMain() {
int errors = 0;
- mac::ScopedNSAutoreleasePool pool; // noop if not OSX
+#if defined(OS_MACOSX)
+ mac::ScopedNSAutoreleasePool pool;
+#endif
const uint32 kDataSize = 1024;
SharedMemory memory;
bool rv = memory.CreateNamed(s_test_name_, true, kDataSize);