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

Side by Side Diff: base/file_util.h

Issue 200473002: Move all callers of GetHomeDir() to PathService::Get(base::DIR_HOME). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 6 years, 7 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 | « no previous file | base/file_util_posix.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 // This file contains utility functions for dealing with the local 5 // This file contains utility functions for dealing with the local
6 // filesystem. 6 // filesystem.
7 7
8 #ifndef BASE_FILE_UTIL_H_ 8 #ifndef BASE_FILE_UTIL_H_
9 #define BASE_FILE_UTIL_H_ 9 #define BASE_FILE_UTIL_H_
10 10
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // instead of this function. Those variants will ensure that the proper 211 // instead of this function. Those variants will ensure that the proper
212 // permissions are set so that other users on the system can't edit them while 212 // permissions are set so that other users on the system can't edit them while
213 // they're open (which can lead to security issues). 213 // they're open (which can lead to security issues).
214 BASE_EXPORT bool GetTempDir(FilePath* path); 214 BASE_EXPORT bool GetTempDir(FilePath* path);
215 215
216 // Get the home directory. This is more complicated than just getenv("HOME") 216 // Get the home directory. This is more complicated than just getenv("HOME")
217 // as it knows to fall back on getpwent() etc. 217 // as it knows to fall back on getpwent() etc.
218 // 218 //
219 // You should not generally call this directly. Instead use DIR_HOME with the 219 // You should not generally call this directly. Instead use DIR_HOME with the
220 // path service which will use this function but cache the value. 220 // path service which will use this function but cache the value.
221 // Path service may also override DIR_HOME.
221 BASE_EXPORT FilePath GetHomeDir(); 222 BASE_EXPORT FilePath GetHomeDir();
222 223
223 // Creates a temporary file. The full path is placed in |path|, and the 224 // Creates a temporary file. The full path is placed in |path|, and the
224 // function returns true if was successful in creating the file. The file will 225 // function returns true if was successful in creating the file. The file will
225 // be empty and all handles closed after this function returns. 226 // be empty and all handles closed after this function returns.
226 BASE_EXPORT bool CreateTemporaryFile(FilePath* path); 227 BASE_EXPORT bool CreateTemporaryFile(FilePath* path);
227 228
228 // Same as CreateTemporaryFile but the file is created in |dir|. 229 // Same as CreateTemporaryFile but the file is created in |dir|.
229 BASE_EXPORT bool CreateTemporaryFileInDir(const FilePath& dir, 230 BASE_EXPORT bool CreateTemporaryFileInDir(const FilePath& dir,
230 FilePath* temp_file); 231 FilePath* temp_file);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 // This function simulates Move(), but unlike Move() it works across volumes. 446 // This function simulates Move(), but unlike Move() it works across volumes.
446 // This function is not transactional. 447 // This function is not transactional.
447 BASE_EXPORT bool CopyAndDeleteDirectory(const FilePath& from_path, 448 BASE_EXPORT bool CopyAndDeleteDirectory(const FilePath& from_path,
448 const FilePath& to_path); 449 const FilePath& to_path);
449 #endif // defined(OS_WIN) 450 #endif // defined(OS_WIN)
450 451
451 } // namespace internal 452 } // namespace internal
452 } // namespace base 453 } // namespace base
453 454
454 #endif // BASE_FILE_UTIL_H_ 455 #endif // BASE_FILE_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/file_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698