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

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

Issue 10855002: Change the type of file_type parameter to int, as the parameter actually takes or-ed bitmasks, (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix missing comma. Created 8 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 unified diff | Download patch
« no previous file with comments | « base/file_util_win.cc ('k') | chrome/browser/chromeos/gdata/gdata_cache.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 <sys/stat.h> 9 #include <sys/stat.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } else { 94 } else {
95 real_to_path = real_to_path.DirName(); 95 real_to_path = real_to_path.DirName();
96 if (!AbsolutePath(&real_to_path)) 96 if (!AbsolutePath(&real_to_path))
97 return false; 97 return false;
98 } 98 }
99 if (real_to_path.value().compare(0, source_dir.value().size(), 99 if (real_to_path.value().compare(0, source_dir.value().size(),
100 source_dir.value()) == 0) 100 source_dir.value()) == 0)
101 return false; 101 return false;
102 102
103 bool success = true; 103 bool success = true;
104 FileEnumerator::FileType traverse_type = 104 int traverse_type = FileEnumerator::FILES |
105 static_cast<FileEnumerator::FileType>(FileEnumerator::FILES | 105 FileEnumerator::SHOW_SYM_LINKS | FileEnumerator::DIRECTORIES;
106 FileEnumerator::SHOW_SYM_LINKS | FileEnumerator::DIRECTORIES);
107 FileEnumerator traversal(source_dir, true, traverse_type); 106 FileEnumerator traversal(source_dir, true, traverse_type);
108 107
109 // dest_dir may not exist yet, start the loop with dest_dir 108 // dest_dir may not exist yet, start the loop with dest_dir
110 FileEnumerator::FindInfo info; 109 FileEnumerator::FindInfo info;
111 FilePath current = source_dir; 110 FilePath current = source_dir;
112 if (stat(source_dir.value().c_str(), &info.stat) < 0) { 111 if (stat(source_dir.value().c_str(), &info.stat) < 0) {
113 DLOG(ERROR) << "CopyRecursiveDirNoCache() couldn't stat source directory: " 112 DLOG(ERROR) << "CopyRecursiveDirNoCache() couldn't stat source directory: "
114 << source_dir.value() << " errno = " << errno; 113 << source_dir.value() << " errno = " << errno;
115 success = false; 114 success = false;
116 } 115 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 DCHECK(info_ != NULL); 182 DCHECK(info_ != NULL);
184 DCHECK_NE(0u, length_); 183 DCHECK_NE(0u, length_);
185 } 184 }
186 185
187 PermissionRestorer::~PermissionRestorer() { 186 PermissionRestorer::~PermissionRestorer() {
188 if (!RestorePermissionInfo(path_, info_, length_)) 187 if (!RestorePermissionInfo(path_, info_, length_))
189 NOTREACHED(); 188 NOTREACHED();
190 } 189 }
191 190
192 } // namespace file_util 191 } // namespace file_util
OLDNEW
« no previous file with comments | « base/file_util_win.cc ('k') | chrome/browser/chromeos/gdata/gdata_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698