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

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: Move subprocess homedir override to ChromeContentBrowserClient/ChromeMainDelegate Created 6 years, 8 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') | crypto/nss_util.cc » ('J')
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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // instead of this function. Those variants will ensure that the proper 209 // instead of this function. Those variants will ensure that the proper
210 // permissions are set so that other users on the system can't edit them while 210 // permissions are set so that other users on the system can't edit them while
211 // they're open (which can lead to security issues). 211 // they're open (which can lead to security issues).
212 BASE_EXPORT bool GetTempDir(FilePath* path); 212 BASE_EXPORT bool GetTempDir(FilePath* path);
213 213
214 // Get the home directory. This is more complicated than just getenv("HOME") 214 // Get the home directory. This is more complicated than just getenv("HOME")
215 // as it knows to fall back on getpwent() etc. 215 // as it knows to fall back on getpwent() etc.
216 // 216 //
217 // You should not generally call this directly. Instead use DIR_HOME with the 217 // You should not generally call this directly. Instead use DIR_HOME with the
218 // path service which will use this function but cache the value. 218 // path service which will use this function but cache the value.
219 // Path service may as well override DIR_HOME.
wtc 2014/04/22 22:26:55 Nit: change "as well" to "also", or put "as well"
Nikita (slow) 2014/04/23 04:48:08 Done.
219 BASE_EXPORT FilePath GetHomeDir(); 220 BASE_EXPORT FilePath GetHomeDir();
220 221
221 // Creates a temporary file. The full path is placed in |path|, and the 222 // Creates a temporary file. The full path is placed in |path|, and the
222 // function returns true if was successful in creating the file. The file will 223 // function returns true if was successful in creating the file. The file will
223 // be empty and all handles closed after this function returns. 224 // be empty and all handles closed after this function returns.
224 BASE_EXPORT bool CreateTemporaryFile(FilePath* path); 225 BASE_EXPORT bool CreateTemporaryFile(FilePath* path);
225 226
226 // Same as CreateTemporaryFile but the file is created in |dir|. 227 // Same as CreateTemporaryFile but the file is created in |dir|.
227 BASE_EXPORT bool CreateTemporaryFileInDir(const FilePath& dir, 228 BASE_EXPORT bool CreateTemporaryFileInDir(const FilePath& dir,
228 FilePath* temp_file); 229 FilePath* temp_file);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 // This function simulates Move(), but unlike Move() it works across volumes. 444 // This function simulates Move(), but unlike Move() it works across volumes.
444 // This function is not transactional. 445 // This function is not transactional.
445 BASE_EXPORT bool CopyAndDeleteDirectory(const FilePath& from_path, 446 BASE_EXPORT bool CopyAndDeleteDirectory(const FilePath& from_path,
446 const FilePath& to_path); 447 const FilePath& to_path);
447 #endif // defined(OS_WIN) 448 #endif // defined(OS_WIN)
448 449
449 } // namespace internal 450 } // namespace internal
450 } // namespace base 451 } // namespace base
451 452
452 #endif // BASE_FILE_UTIL_H_ 453 #endif // BASE_FILE_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/file_util_posix.cc » ('j') | crypto/nss_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698