| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/test/test_file_util.h" | 5 #include "base/test/test_file_util.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #include <sys/stat.h> | 9 #include <sys/stat.h> |
| 10 #include <sys/types.h> | 10 #include <sys/types.h> |
| 11 | 11 |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/file_util.h" | |
| 15 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 15 #include "base/files/file_util.h" |
| 16 #include "base/logging.h" | 16 #include "base/logging.h" |
| 17 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
| 18 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
| 19 | 19 |
| 20 namespace base { | 20 namespace base { |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 // Deny |permission| on the file |path|. | 24 // Deny |permission| on the file |path|. |
| 25 bool DenyFilePermission(const FilePath& path, mode_t permission) { | 25 bool DenyFilePermission(const FilePath& path, mode_t permission) { |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 DCHECK(info_ != NULL); | 99 DCHECK(info_ != NULL); |
| 100 DCHECK_NE(0u, length_); | 100 DCHECK_NE(0u, length_); |
| 101 } | 101 } |
| 102 | 102 |
| 103 FilePermissionRestorer::~FilePermissionRestorer() { | 103 FilePermissionRestorer::~FilePermissionRestorer() { |
| 104 if (!RestorePermissionInfo(path_, info_, length_)) | 104 if (!RestorePermissionInfo(path_, info_, length_)) |
| 105 NOTREACHED(); | 105 NOTREACHED(); |
| 106 } | 106 } |
| 107 | 107 |
| 108 } // namespace base | 108 } // namespace base |
| OLD | NEW |