| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/common/sandbox_mac.h" | 5 #include "chrome/common/sandbox_mac.h" |
| 6 | 6 |
| 7 #include "base/debug_util.h" | 7 #include "base/debug_util.h" |
| 8 | 8 |
| 9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 #import <OpenGL/OpenGL.h> | 10 #import <OpenGL/OpenGL.h> |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 { | 256 { |
| 257 // Preload either the desktop GL or the osmesa so, depending on the | 257 // Preload either the desktop GL or the osmesa so, depending on the |
| 258 // --use-gl flag. | 258 // --use-gl flag. |
| 259 gfx::GLContext::InitializeOneOff(); | 259 gfx::GLContext::InitializeOneOff(); |
| 260 } | 260 } |
| 261 | 261 |
| 262 { | 262 { |
| 263 // Access to /dev/random is required for the field trial code. | 263 // Access to /dev/random is required for the field trial code. |
| 264 GetUrandomFD(); | 264 GetUrandomFD(); |
| 265 } | 265 } |
| 266 | |
| 267 { // Without this, the GPU process dies during [CrApplication init]. | |
| 268 [CrApplication sharedApplication]; | |
| 269 } | |
| 270 break; | 266 break; |
| 271 | 267 |
| 272 default: | 268 default: |
| 273 // To shut up a gcc warning. | 269 // To shut up a gcc warning. |
| 274 break; | 270 break; |
| 275 } | 271 } |
| 276 } | 272 } |
| 277 | 273 |
| 278 // static | 274 // static |
| 279 NSString* Sandbox::BuildAllowDirectoryAccessSandboxString( | 275 NSString* Sandbox::BuildAllowDirectoryAccessSandboxString( |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 if (HANDLE_EINTR(fcntl(fd, F_GETPATH, canonical_path)) != 0) { | 579 if (HANDLE_EINTR(fcntl(fd, F_GETPATH, canonical_path)) != 0) { |
| 584 PLOG(FATAL) << "GetCanonicalSandboxPath() failed for: " | 580 PLOG(FATAL) << "GetCanonicalSandboxPath() failed for: " |
| 585 << path->value(); | 581 << path->value(); |
| 586 return; | 582 return; |
| 587 } | 583 } |
| 588 | 584 |
| 589 *path = FilePath(canonical_path); | 585 *path = FilePath(canonical_path); |
| 590 } | 586 } |
| 591 | 587 |
| 592 } // namespace sandbox | 588 } // namespace sandbox |
| OLD | NEW |