OLD | NEW |
---|---|
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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
220 // Only useful on POSIX; redirects to GetTempDir() on Windows. | 220 // Only useful on POSIX; redirects to GetTempDir() on Windows. |
221 BASE_EXPORT bool GetShmemTempDir(bool executable, FilePath* path); | 221 BASE_EXPORT bool GetShmemTempDir(bool executable, FilePath* path); |
222 | 222 |
223 // Get the home directory. This is more complicated than just getenv("HOME") | 223 // Get the home directory. This is more complicated than just getenv("HOME") |
224 // as it knows to fall back on getpwent() etc. | 224 // as it knows to fall back on getpwent() etc. |
225 // | 225 // |
226 // You should not generally call this directly. Instead use DIR_HOME with the | 226 // You should not generally call this directly. Instead use DIR_HOME with the |
227 // path service which will use this function but cache the value. | 227 // path service which will use this function but cache the value. |
228 BASE_EXPORT FilePath GetHomeDir(); | 228 BASE_EXPORT FilePath GetHomeDir(); |
229 | 229 |
230 #if defined(OS_CHROMEOS) | |
231 // Called when user is logged in on ChromeOS. | |
232 BASE_EXPORT void SetUserLoggedIn(bool logged_in); | |
233 | |
234 // Called when primary logged in user id hash is available in on ChromeOS. | |
235 BASE_EXPORT void SetPrimaryUserIdHash(std::string user_id_hash); | |
Dmitry Polukhin
2014/03/14 16:35:25
I think we can use empty user_id_hash as sign that
Nikita (slow)
2014/03/14 16:39:52
Done.
| |
236 #endif | |
237 | |
230 // Creates a temporary file. The full path is placed in |path|, and the | 238 // Creates a temporary file. The full path is placed in |path|, and the |
231 // function returns true if was successful in creating the file. The file will | 239 // function returns true if was successful in creating the file. The file will |
232 // be empty and all handles closed after this function returns. | 240 // be empty and all handles closed after this function returns. |
233 BASE_EXPORT bool CreateTemporaryFile(FilePath* path); | 241 BASE_EXPORT bool CreateTemporaryFile(FilePath* path); |
234 | 242 |
235 // Same as CreateTemporaryFile but the file is created in |dir|. | 243 // Same as CreateTemporaryFile but the file is created in |dir|. |
236 BASE_EXPORT bool CreateTemporaryFileInDir(const FilePath& dir, | 244 BASE_EXPORT bool CreateTemporaryFileInDir(const FilePath& dir, |
237 FilePath* temp_file); | 245 FilePath* temp_file); |
238 | 246 |
239 // Create and open a temporary file. File is opened for read/write. | 247 // Create and open a temporary file. File is opened for read/write. |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
475 // This function simulates Move(), but unlike Move() it works across volumes. | 483 // This function simulates Move(), but unlike Move() it works across volumes. |
476 // This function is not transactional. | 484 // This function is not transactional. |
477 BASE_EXPORT bool CopyAndDeleteDirectory(const FilePath& from_path, | 485 BASE_EXPORT bool CopyAndDeleteDirectory(const FilePath& from_path, |
478 const FilePath& to_path); | 486 const FilePath& to_path); |
479 #endif // defined(OS_WIN) | 487 #endif // defined(OS_WIN) |
480 | 488 |
481 } // namespace internal | 489 } // namespace internal |
482 } // namespace base | 490 } // namespace base |
483 | 491 |
484 #endif // BASE_FILE_UTIL_H_ | 492 #endif // BASE_FILE_UTIL_H_ |
OLD | NEW |