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

Side by Side Diff: base/file_util_mac.mm

Issue 3176026: FBTF: Remove unneeded headers from base/ (part 7) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « base/crypto/cssm_init.h ('k') | base/file_util_unittest.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/file_util.h" 5 #include "base/file_util.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include <copyfile.h> 8 #include <copyfile.h>
9 9
10 #include "base/basictypes.h"
10 #include "base/file_path.h" 11 #include "base/file_path.h"
11 #include "base/logging.h"
12 #include "base/string_util.h" 12 #include "base/string_util.h"
13 13
14 namespace file_util { 14 namespace file_util {
15 15
16 bool GetTempDir(FilePath* path) { 16 bool GetTempDir(FilePath* path) {
17 NSString* tmp = NSTemporaryDirectory(); 17 NSString* tmp = NSTemporaryDirectory();
18 if (tmp == nil) 18 if (tmp == nil)
19 return false; 19 return false;
20 *path = FilePath([tmp fileSystemRepresentation]); 20 *path = FilePath([tmp fileSystemRepresentation]);
21 return true; 21 return true;
22 } 22 }
23 23
24 bool GetShmemTempDir(FilePath* path) { 24 bool GetShmemTempDir(FilePath* path) {
25 return GetTempDir(path); 25 return GetTempDir(path);
26 } 26 }
27 27
28 bool CopyFile(const FilePath& from_path, const FilePath& to_path) { 28 bool CopyFile(const FilePath& from_path, const FilePath& to_path) {
29 return (copyfile(from_path.value().c_str(), 29 return (copyfile(from_path.value().c_str(),
30 to_path.value().c_str(), NULL, COPYFILE_ALL) == 0); 30 to_path.value().c_str(), NULL, COPYFILE_ALL) == 0);
31 } 31 }
32 32
33 } // namespace 33 } // namespace
OLDNEW
« no previous file with comments | « base/crypto/cssm_init.h ('k') | base/file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698