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

Unified Diff: chrome/common/sandbox_mac_unittest_helper.mm

Issue 4380001: Mac Sandbox: Clean up forward declaration of internal sandbox functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 10 years, 1 month 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
« chrome/common/sandbox_mac.h ('K') | « chrome/common/sandbox_mac_unittest_helper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/sandbox_mac_unittest_helper.mm
diff --git a/chrome/common/sandbox_mac_unittest_helper.mm b/chrome/common/sandbox_mac_unittest_helper.mm
index 007530e3525107391d458512736db0bd3d4a0d62..4e885b507bebe5c3dabef877c998e902e3fe2fd9 100644
--- a/chrome/common/sandbox_mac_unittest_helper.mm
+++ b/chrome/common/sandbox_mac_unittest_helper.mm
@@ -16,6 +16,8 @@ extern "C" {
#include "chrome/common/sandbox_mac.h"
#include "testing/multiprocess_func_list.h"
+using sandbox::Sandbox;
+
namespace {
const char* kSandboxTypeKey = "CHROMIUM_SANDBOX_SANDBOX_TYPE";
@@ -52,10 +54,10 @@ bool MacSandboxTest:: RunTestInAllSandboxTypes(const char* test_name,
const char* test_data) {
// Go through all the sandbox types, and run the test case in each of them
// if one fails, abort.
- for(int i = static_cast<int>(sandbox::SANDBOX_TYPE_FIRST_TYPE);
- i < sandbox::SANDBOX_AFTER_TYPE_LAST_TYPE;
+ for(int i = static_cast<int>(Sandbox::SANDBOX_TYPE_FIRST_TYPE);
+ i < Sandbox::SANDBOX_AFTER_TYPE_LAST_TYPE;
++i) {
- if (!RunTestInSandbox(static_cast<sandbox::SandboxProcessType>(i),
+ if (!RunTestInSandbox(static_cast<Sandbox::SandboxProcessType>(i),
test_name, test_data)) {
LOG(ERROR) << "Sandboxed test (" << test_name << ")" <<
"Failed in sandbox type " << i <<
@@ -66,7 +68,7 @@ bool MacSandboxTest:: RunTestInAllSandboxTypes(const char* test_name,
return true;
}
-bool MacSandboxTest::RunTestInSandbox(sandbox::SandboxProcessType sandbox_type,
+bool MacSandboxTest::RunTestInSandbox(Sandbox::SandboxProcessType sandbox_type,
const char* test_name,
const char* test_data) {
std::stringstream s;
@@ -116,8 +118,8 @@ MULTIPROCESS_TEST_MAIN(mac_sandbox_test_runner) {
LOG(ERROR) << "Sandbox type not specified";
return -1;
}
- sandbox::SandboxProcessType sandbox_type =
- static_cast<sandbox::SandboxProcessType>(atoi(sandbox_type_str));
+ Sandbox::SandboxProcessType sandbox_type =
+ static_cast<Sandbox::SandboxProcessType>(atoi(sandbox_type_str));
char* sandbox_test_name = getenv(kSandboxTestNameKey);
if (!sandbox_test_name) {
LOG(ERROR) << "Sandbox test name not specified";
@@ -141,9 +143,9 @@ MULTIPROCESS_TEST_MAIN(mac_sandbox_test_runner) {
return -1;
}
- sandbox::SandboxWarmup();
+ Sandbox::SandboxWarmup();
- if (!sandbox::EnableSandbox(sandbox_type, FilePath())) {
+ if (!Sandbox::EnableSandbox(sandbox_type, FilePath())) {
LOG(ERROR) << "Failed to initialize sandbox " << sandbox_type;
return -1;
}
« chrome/common/sandbox_mac.h ('K') | « chrome/common/sandbox_mac_unittest_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698