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

Side by Side Diff: base/test/test_file_util_posix.cc

Issue 1544113002: Switch to standard integer types in base/test/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « base/test/test_file_util_mac.cc ('k') | base/test/test_file_util_win.cc » ('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) 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 <stddef.h>
9 #include <sys/stat.h> 10 #include <sys/stat.h>
10 #include <sys/types.h> 11 #include <sys/types.h>
11 12
12 #include <string> 13 #include <string>
13 14
14 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
15 #include "base/files/file_util.h" 16 #include "base/files/file_util.h"
16 #include "base/logging.h" 17 #include "base/logging.h"
17 #include "base/strings/string_util.h" 18 #include "base/strings/string_util.h"
18 #include "base/strings/utf_string_conversions.h" 19 #include "base/strings/utf_string_conversions.h"
20 #include "build/build_config.h"
19 21
20 namespace base { 22 namespace base {
21 23
22 namespace { 24 namespace {
23 25
24 // Deny |permission| on the file |path|. 26 // Deny |permission| on the file |path|.
25 bool DenyFilePermission(const FilePath& path, mode_t permission) { 27 bool DenyFilePermission(const FilePath& path, mode_t permission) {
26 struct stat stat_buf; 28 struct stat stat_buf;
27 if (stat(path.value().c_str(), &stat_buf) != 0) 29 if (stat(path.value().c_str(), &stat_buf) != 0)
28 return false; 30 return false;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 DCHECK(info_ != NULL); 101 DCHECK(info_ != NULL);
100 DCHECK_NE(0u, length_); 102 DCHECK_NE(0u, length_);
101 } 103 }
102 104
103 FilePermissionRestorer::~FilePermissionRestorer() { 105 FilePermissionRestorer::~FilePermissionRestorer() {
104 if (!RestorePermissionInfo(path_, info_, length_)) 106 if (!RestorePermissionInfo(path_, info_, length_))
105 NOTREACHED(); 107 NOTREACHED();
106 } 108 }
107 109
108 } // namespace base 110 } // namespace base
OLDNEW
« no previous file with comments | « base/test/test_file_util_mac.cc ('k') | base/test/test_file_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698