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

Side by Side Diff: content/renderer/renderer_main_platform_delegate_mac.mm

Issue 8589001: Load mac sandbox definitions from resources instead of the bundle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: also remove old bundle gyp code Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698