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

Side by Side Diff: chrome/common/sandbox_mac.h

Issue 3022005: Recommit - r52326 - Mac: Use canonicalization rather than absolute paths for sandbox. (Closed)
Patch Set: Created 10 years, 5 months 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
« no previous file with comments | « no previous file | chrome/common/sandbox_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #ifndef CHROME_COMMON_SANDBOX_MAC_H_ 5 #ifndef CHROME_COMMON_SANDBOX_MAC_H_
6 #define CHROME_COMMON_SANDBOX_MAC_H_ 6 #define CHROME_COMMON_SANDBOX_MAC_H_
7 7
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 9
10 namespace sandbox { 10 namespace sandbox {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // profile that supports this is SANDBOX_TYPE_UTILITY . 43 // profile that supports this is SANDBOX_TYPE_UTILITY .
44 // 44 //
45 // |allowed_dir| must be a "simple" string since it's placed as is in a regex 45 // |allowed_dir| must be a "simple" string since it's placed as is in a regex
46 // i.e. it must not contain quotation characters, escaping or any characters 46 // i.e. it must not contain quotation characters, escaping or any characters
47 // that might have special meaning when blindly substituted into a regular 47 // that might have special meaning when blindly substituted into a regular
48 // expression - crbug.com/26492 . 48 // expression - crbug.com/26492 .
49 // Returns true on success, false if an error occurred enabling the sandbox. 49 // Returns true on success, false if an error occurred enabling the sandbox.
50 bool EnableSandbox(SandboxProcessType sandbox_type, 50 bool EnableSandbox(SandboxProcessType sandbox_type,
51 const FilePath& allowed_dir); 51 const FilePath& allowed_dir);
52 52
53 // Convert provided path into a "canonical" path matching what the Sandbox
54 // expects i.e. one without symlinks.
55 // This path is not necessarily unique e.g. in the face of hardlinks.
56 void GetCanonicalSandboxPath(FilePath* path);
57
53 } // namespace sandbox 58 } // namespace sandbox
54 59
55 #endif // CHROME_COMMON_SANDBOX_MAC_H_ 60 #endif // CHROME_COMMON_SANDBOX_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/common/sandbox_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698