OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "content/renderer/renderer_main_platform_delegate.h" | 5 #include "content/renderer/renderer_main_platform_delegate.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 #include <objc/runtime.h> | 8 #include <objc/runtime.h> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 NOTREACHED() << "Failed to load bundle"; | 70 NOTREACHED() << "Failed to load bundle"; |
71 return false; | 71 return false; |
72 } | 72 } |
73 sandbox_tests_bundle_ = [tests_bundle retain]; | 73 sandbox_tests_bundle_ = [tests_bundle retain]; |
74 [objc_getClass("RendererSandboxTestsRunner") setLogFunction:LogTestMessage]; | 74 [objc_getClass("RendererSandboxTestsRunner") setLogFunction:LogTestMessage]; |
75 } | 75 } |
76 return true; | 76 return true; |
77 } | 77 } |
78 | 78 |
79 bool RendererMainPlatformDelegate::EnableSandbox() { | 79 bool RendererMainPlatformDelegate::EnableSandbox() { |
80 return content::InitializeSandbox(); | 80 return content::InitializeSandboxFromProcessType(); |
81 } | 81 } |
82 | 82 |
83 void RendererMainPlatformDelegate::RunSandboxTests() { | 83 void RendererMainPlatformDelegate::RunSandboxTests() { |
84 Class tests_runner = objc_getClass("RendererSandboxTestsRunner"); | 84 Class tests_runner = objc_getClass("RendererSandboxTestsRunner"); |
85 if (tests_runner) { | 85 if (tests_runner) { |
86 if (![tests_runner runTests]) | 86 if (![tests_runner runTests]) |
87 LOG(ERROR) << "Running renderer with failing sandbox tests!"; | 87 LOG(ERROR) << "Running renderer with failing sandbox tests!"; |
88 [sandbox_tests_bundle_ unload]; | 88 [sandbox_tests_bundle_ unload]; |
89 [sandbox_tests_bundle_ release]; | 89 [sandbox_tests_bundle_ release]; |
90 sandbox_tests_bundle_ = nil; | 90 sandbox_tests_bundle_ = nil; |
91 } | 91 } |
92 } | 92 } |
OLD | NEW |