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

Unified Diff: trunk/src/content/common/sandbox_mac.mm

Issue 469293002: Revert 289526 "Fix Mac sandbox meta data access" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/content/common/sandbox_mac.h ('k') | trunk/src/content/common/sandbox_mac_diraccess_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/content/common/sandbox_mac.mm
===================================================================
--- trunk/src/content/common/sandbox_mac.mm (revision 289539)
+++ trunk/src/content/common/sandbox_mac.mm (working copy)
@@ -114,14 +114,12 @@
// Collect a list of all parent directories.
base::FilePath last_path = allowed_path;
std::vector<base::FilePath> subpaths;
-
- base::FilePath path = allowed_path;
- do {
+ for (base::FilePath path = allowed_path;
+ path.value() != last_path.value();
+ path = path.DirName()) {
subpaths.push_back(path);
-
last_path = path;
- path = path.DirName();
- } while (path.value() != last_path.value());
+ }
// Iterate through all parents and allow stat() on them explicitly.
NSString* sandbox_command = @"(allow file-read-metadata ";
« no previous file with comments | « trunk/src/content/common/sandbox_mac.h ('k') | trunk/src/content/common/sandbox_mac_diraccess_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698