summaryrefslogtreecommitdiffstats
path: root/base/file_util_posix.cc
Commit message (Collapse)AuthorAgeFilesLines
* file_util: The member variable |pattern_| has a different type (FilePath) ↵thestig@chromium.org2009-12-081-11/+10
| | | | | | | | | | | | | | | from the constructor parameter (StringType). So fix this type to match with the constructor. Original patch by Thiago Farina <thiago.farina@gmail.com> at http://codereview.chromium.org/465119/show BUG=none TEST=none Review URL: http://codereview.chromium.org/466071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34092 0039d316-1c4b-4281-b951-d872f2087c98
* For now, let's clear local storage whenever we clear cookies.jorlow@chromium.org2009-11-261-0/+5
| | | | | | | | BUG=28788 TEST="Clear private data..." from the menu, check cookies, and tell it ok. Data in "Local Storage" inside the profile's data dir should be deleted and any open websites that were using that data should no longer be able to see it. Review URL: http://codereview.chromium.org/441012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33162 0039d316-1c4b-4281-b951-d872f2087c98
* reland 31875. Revert was:estade@chromium.org2009-11-161-33/+9
| | | | | | | | | | | | | | ------ Revert 31875 to see whether it fixes reliability bot. BUG=25677 TEST=None ------ TBR=huanr Review URL: http://codereview.chromium.org/397017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32112 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 31875 to see whether it fixes reliability bot.huanr@chromium.org2009-11-161-9/+33
| | | | | | | | | BUG=25677 TEST=None Review URL: http://codereview.chromium.org/397014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32074 0039d316-1c4b-4281-b951-d872f2087c98
* Use renderer spellchecker for windows.estade@chromium.org2009-11-131-33/+9
| | | | | | | BUG=25677 Review URL: http://codereview.chromium.org/372075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31875 0039d316-1c4b-4281-b951-d872f2087c98
* Move the spellchecker to the renderer.estade@chromium.org2009-11-061-11/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation is that this removes the sync IPC on every call to the spellchecker. Also, currently we spellcheck in the IO thread, which frequently needs to go to disk (in particular, the entire spellcheck dictionary starts paged out), so this will block just the single renderer when that happens, rather than the whole IO thread. This breaks the SpellChecker class into two new classes. 1) On the browser side, we have SpellCheckHost. This class handles browser-wide tasks, such as keeping the custom words list in sync with the on-disk custom words dictionary, downloading missing dictionaries, etc. On Posix, it also opens the bdic file since the renderer isn't allowed to open files. SpellCheckHost is created and destroyed on the UI thread. It is initialized on the file thread. 2) On the renderer side, SpellChecker2. This class will one day be renamed SpellChecker. It handles actual checking of the words, memory maps the dictionary file, loads hunspell, etc. There is one SpellChecker2 per RenderThread (hence one per render process). My intention is for this patch to move Linux to this new approach, and follow up with ports for Windows (which will involve passing a dictionary file name rather than a file descriptor through to the renderer) and Mac (which will involve adding sync ViewHost IPC callsfor when the platform spellchecker is enabled). Note that anyone using the platform spellchecker rather than Hunspell will get no benefit out of this refactor. There should be no loss of functionality for Linux (or any other platform) in this patch. The following should all still work: - dictionary is loaded lazily - hunspell is initialized lazily, per renderer - language changes work. - Dynamic downloading of new dictionaries - auto spell correct works (as well as toggling it). - disabling spellcheck works. - custom words work (including adding in one renderer and immediately having it take effect in other renderers, for certain values of "immediate") TODO: - move spellchecker unit tests to test SpellCheck2 - add sync IPC for platform spellchecker; port to Mac - add dictionary location fallback; port to Windows - remove SpellChecker classes from browser/ BUG=25677 Review URL: http://codereview.chromium.org/357003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31199 0039d316-1c4b-4281-b951-d872f2087c98
* Remove file_util::TrimTrailingSeparators(), which is deprecated andtkent@chromium.org2009-10-151-3/+3
| | | | | | | | | | doesn't work well for Windows root drives. BUG=24722 TEST=existing tests are enough. Review URL: http://codereview.chromium.org/271086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29093 0039d316-1c4b-4281-b951-d872f2087c98
* More CopyDirectory tests and fixesvandebo@chromium.org2009-10-151-9/+26
| | | | | | | | | BUG=themes stopped working on Linux and Mac TEST=unittests Review URL: http://codereview.chromium.org/269083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29076 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate all uses of strerror() in code that uses src/base. strerror() is ↵tschmelcher@chromium.org2009-10-131-4/+3
| | | | | | | | | | | inherently unsafe in multi-threaded apps because it stores the string in a global buffer. It should never be used. If you want to log an error, use PLOG and friends, or if that's too high-level then use safe_strerror(). TEST=built on Linux in 32-bit and 64-bit mode; ran base_unittests in each case; ran Chromium itself in each case; try servers BUG=none Review URL: http://codereview.chromium.org/261055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28850 0039d316-1c4b-4281-b951-d872f2087c98
* Match window's behavior when recursively copying directories that exist.vandebo@chromium.org2009-10-131-2/+11
| | | | | | | | | | | Unit test improvement from here (sgk): http://codereview.chromium.org/271060 BUG=none TEST=unittests Review URL: http://codereview.chromium.org/270086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28838 0039d316-1c4b-4281-b951-d872f2087c98
* Separate out some more ICU from base and into base/i18n.brettw@chromium.org2009-10-081-70/+0
| | | | | | | | | | | | | | | | | | | | This moves string_util_icu. I moved the number formatting function into base/i18n/number_formatting and just removed the other function in string_util_icu which was TrimWhitespaceUTF8. It is only used in a few places and isn't actually helpful (and the fact that it round-trips through UTF-16 is better for the caller to see). This takes out the sorting from the FileEnumerator. The comment says the sorting is not guaranteed. I moved it into file_util_icu as a standalone function for callers of FileEnumerator to call manually if they need sorted results. I modified the directory lister to use this sorting instead, and filed a bug on doing more optimal JS-based sorting. TEST=none BUG=none Review URL: http://codereview.chromium.org/267001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28405 0039d316-1c4b-4281-b951-d872f2087c98
* Copy the relevant parts of ICU to a new file base/third_party/icu/icu_utf.*brettw@chromium.org2009-10-071-0/+1
| | | | | | | | | | | | | | so we can do basic UTF8/16/32 conversions without linking all of ICU. Change callers who used to call SysUTF8ToWide/SysWideToUTF8 in base to using these new functions. I will remove the Sys versions of these functions in a later patch. TEST=none BUG=none Review URL: http://codereview.chromium.org/243102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28219 0039d316-1c4b-4281-b951-d872f2087c98
* Use MAC_OS_X_DEPLOYMENT_TARGET instead of rolling our own macro.mark@chromium.org2009-09-161-1/+7
| | | | | | | Allow the deployment target and SDK to be overridden by GYP variables. Review URL: http://codereview.chromium.org/193128 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26360 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: print page to file rather than using shared memory to send it to the ↵estade@chromium.org2009-09-161-11/+14
| | | | | | | | | | | | browser. BUG=9847 adapted from patch by <minyu.huang [at] gmail> Review URL: http://codereview.chromium.org/203062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26308 0039d316-1c4b-4281-b951-d872f2087c98
* Changes needed for MacOS X 10.4 support.maf@google.com2009-09-151-1/+2
| | | | | | | | Add "support_macosx_10_4" option to common.gypi that causes it to change deployment target, and define a new preprocessor symbol on the Mac build. Setting this flag to true is harmless on non Mac builds and has no effect. Make various changes to source files where they modify their behavior in the presence of the new preprocessor symbol to become 10.4 compatible. Review URL: http://codereview.chromium.org/201122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26285 0039d316-1c4b-4281-b951-d872f2087c98
* Bug fix: produce unique temp file names when the VFS requests a handle to a ↵dumi@chromium.org2009-09-111-5/+4
| | | | | | | | | | | null file. BUG=none TEST=none Review URL: http://codereview.chromium.org/194021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26001 0039d316-1c4b-4281-b951-d872f2087c98
* Removes a piece of comment that no longer applies.erikkay@chromium.org2009-09-111-4/+2
| | | | | | | Review URL: http://codereview.chromium.org/194036 Patch from thiago.farina@gmail.com. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25982 0039d316-1c4b-4281-b951-d872f2087c98
* Added USE_GDK, set when either TOOLKIT_GTK or TOOLKIT_VIEWS is set butbenl@chromium.org2009-09-071-15/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not OS_WIN. Added USE_X11. Set when OS_LINUX or OS_FREEBSD is set. Added USE_BASE_DATA_PACK for base::DataPack usage, set for OS_MACOSX, OS_LINUX or OS_FREEBSD. Added USE_NSS for ... nss (for crypto). Windows and MacOS use platform-specific libraries. All of the above cause slightly odd formulations like: #if defined(OS_WIN) ... #elif defined(USE_BASE_DATA_PACK) ... #endif Possibly should also define USE_DLL_FOR_DATA, etc? Or something? Wrapped various references to struct stat64 and stat64() to use struct stat and stat() for FreeBSD - but a "man stat64" on Linux suggests that we could do the same thing for at least Linux, too, and perhaps eliminate the wrapper? git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25599 0039d316-1c4b-4281-b951-d872f2087c98
* posix: don't complain when stat() fails with ENOENTevan@chromium.org2009-09-031-9/+13
| | | | | | | | | It's not useful to warn the user about broken symlinks when iterating a directory tree. Review URL: http://codereview.chromium.org/197017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25392 0039d316-1c4b-4281-b951-d872f2087c98
* Renames the function CreateTemporaryFilename to CreateTemporaryFile and ↵erikkay@chromium.org2009-08-181-5/+4
| | | | | | | | | | | | | | track down all callers, also removes the deprecated function that uses std::wstring. BUG=3078 (http://crbug.com/3078) TEST=run base_unittests, installer_util_unittests, net_unittests, setup_unittests, and unit_tests. Review URL: http://codereview.chromium.org/164537 Patch from Thiago Farina. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23631 0039d316-1c4b-4281-b951-d872f2087c98
* Use 'icu::' namespace explicitly throughout Chrome tree instead of relying ↵jshin@chromium.org2009-08-181-3/+3
| | | | | | | | | | | | | | | | | | | on 'using namespace icu'. This is Chrome's counterpart to the ICU header change that disables 'using namespace icu' (http://codereview.chromium.org/171010/show), which is required to avoid the name colission between Chrome's StringPiece (in base) and ICU's StringPiece. The webkit change (which is minor) will be dealt with in the webkit bugzilla. This can go in before the ICU change/upgrade without affecting anything. BUG=8198 TEST=All the targets are built without an error on all platforms. Review URL: http://codereview.chromium.org/171012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23613 0039d316-1c4b-4281-b951-d872f2087c98
* Define _FILE_OFFSET_BITS=64 in order to support large files (>2GB).thestig@chromium.org2009-08-061-205/+177
| | | | | | | | | | | | | | | | | | _FILE_OFFSET_BITS=64 is incompatible with fts (issue 17492), so file_util::Delete, file_util::CopyDirectory file_util::FileEnumerator are reimplemented without fts. Delete and CopyDirectory are now implemented using FileEnumerator. Patch from vandebo@google.com, original review: http://codereview.chromium.org/160479 BUG=13718,17492 TEST=none Review URL: http://codereview.chromium.org/165085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22670 0039d316-1c4b-4281-b951-d872f2087c98
* Adding last modified time to file_utilbrettw@chromium.org2009-07-241-0/+1
| | | | | | | | | Original review: http://codereview.chromium.org/160050 Patch by dhg@google.com Review URL: http://codereview.chromium.org/159347 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21533 0039d316-1c4b-4281-b951-d872f2087c98
* Fix: Linux file:// listings are sorted but not fully internationalizedyuzo@chromium.org2009-07-151-12/+67
| | | | | | | | | | | | | | | | | Changed the code such that file names are converted to UTF-16 before comparison. Ideally, the locale should be considered, but my conclusion is that ignoring it is a reasonable tradeoff. Passing a locale-aware comparator (collator) from src/chrome(or src/app?) to src/base requires too much effort, in my opinion. BUG=16179 TEST=Open a file:// URL for a directory that contains non-ascii-named files. Observe that files are sorted properly in the list, in a case-sensitive manner. Review URL: http://codereview.chromium.org/149449 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20706 0039d316-1c4b-4281-b951-d872f2087c98
* Order posix file listings by type as well as name.estade@chromium.org2009-06-241-4/+25
| | | | | | | | | http://crbug.com/12812 TEST=go to /, see that directories are sorted before other files. Review URL: http://codereview.chromium.org/147063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19100 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: refactor zygote supportagl@chromium.org2009-06-121-14/+2
| | | | | | | | | | | | | | | | | | | http://code.google.com/p/chromium/wiki/LinuxZygote * Move Chrome specific bits out of base * Move away from the idea of reserved file descriptors (which don't really work with zygotes) * Load resources before forking renderers (means that we don't need communication between the zygote process and the renderers) * Make sure that gdb works against the browser again * Make sure that we have different ASLR between the renderers and the browser. http://codereview.chromium.org/119335 (This is a reland. First landed in r18109, reverted in r18112.) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18291 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 18109, 18111: Windows UI tests failed.agl@chromium.org2009-06-101-2/+14
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18112 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: refactor zygote supportagl@chromium.org2009-06-101-14/+2
| | | | | | | | | | | | | | | | | | http://code.google.com/p/chromium/wiki/LinuxZygote * Move Chrome specific bits out of base * Move away from the idea of reserved file descriptors (which don't really work with zygotes) * Load resources before forking renderers (means that we don't need communication between the zygote process and the renderers) * Make sure that gdb works against the browser again * Make sure that we have different ASLR between the renderers and the browser. http://codereview.chromium.org/119335 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18109 0039d316-1c4b-4281-b951-d872f2087c98
* Include a parent directory link in the file list for file:///somepathyuzo@chromium.org2009-06-091-2/+22
| | | | | | | | | | | | | | | Also, order files/directories lexicographically. TEST=on linux, type file:///usr/ in the address bar and make sure the contents are sorted and include an entry for '..', which is [parent directory]. On windows, type file:///C:/Users/ . BUG=12621, 12812 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17933 0039d316-1c4b-4281-b951-d872f2087c98
* Enable zygote manager by default.dkegel@google.com2009-06-081-1/+1
| | | | | | | | | | | | | | Fix broken recursion check. Make OpenFile warning less scary, indicate it's normal at start of ui tests. Make ui tests pass. Avoid generating extra code on Mac. BUG=11841 TEST=start the browser, then make chrome and all .pak files unreadable; or alternately, start an installed browser, and uninstall the browser while it's running. Then create a new tab and browse to two new sites. Review URL: http://codereview.chromium.org/119289 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17909 0039d316-1c4b-4281-b951-d872f2087c98
* Prototype implementation of zygotes. dkegel@google.com2009-06-061-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Limitations that need addressing still: - Doesn't forcibly terminate children that should have exited but haven't Enable with env var ENABLE_ZYGOTE_MANAGER=1. BUG=11841 TEST= start the browser, then make chrome and all .pak files unreadable; or alternately, start an installed browser, and uninstall the browser while it's running. Then create a new tab and browse to two new sites. Here's an example script to hide and unhide the .pak files (note: do not move the directory they're in, that doesn't work): #!/bin/sh chmod_all() { chmod $1 sconsbuild/Debug/chrome for path in . locales obj/chrome/app/intermediate/repack obj/global_intermediate/* themes do chmod $1 sconsbuild/Debug/$path/*.pak done } case $1 in hide) chmod_all 000 ;; show) chmod_all 755 ;; esac Review URL: http://codereview.chromium.org/115773 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17840 0039d316-1c4b-4281-b951-d872f2087c98
* Add file_util::ReplaceFile and use it in ImportantFileWriter.phajdan.jr@chromium.org2009-05-191-0/+4
| | | | | | | | | | It has more strict semantics than file_util::Move. http://crbug.com/11585 Review URL: http://codereview.chromium.org/113207 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16386 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Add file_util::ReplaceFile and use it in ImportantFileWriter."phajdan.jr@chromium.org2009-05-181-4/+0
| | | | | | | | | | http://crbug.com/11585 TBR=stoyan Review URL: http://codereview.chromium.org/113534 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16296 0039d316-1c4b-4281-b951-d872f2087c98
* Add file_util::ReplaceFile and use it in ImportantFileWriter.phajdan.jr@chromium.org2009-05-181-0/+4
| | | | | | | | | | It has more strict semantics than file_util::Move. http://crbug.com/11585 Review URL: http://codereview.chromium.org/113207 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16291 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for almost-recursive watches in Linux DirectoryWatcherphajdan.jr@chromium.org2009-05-141-0/+10
| | | | | | | | | | | | | | | | | After this patch DirectoryWatcher when asked for recursive watch will scan the subtree and add inotify watches for each subfolder, but further changes to the tree structure won't trigger adding/removing watches. Support for really recursive watches is planned. This is just to divide the work, because the task is not easy. Based on patch by Janwar Dinata <j.dinata@gmail.com> reviewed at http://codereview.chromium.org/92151 http://crbug.com/8968 Review URL: http://codereview.chromium.org/115229 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16070 0039d316-1c4b-4281-b951-d872f2087c98
* posix: directories should only be readable by the user.evan@chromium.org2009-05-121-3/+2
| | | | | | | | | | | | | Almost all the data we store is private, so we shouldn't even allow it to be group-readable. Note that files still obey the user's umask and if someone wants to make their download directory world-readable we won't undo that. BUG=11776 Review URL: http://codereview.chromium.org/113287 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15890 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Add a macro for handling EINTR.agl@chromium.org2009-05-011-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On POSIX systems, system calls can be interrupted by signals. In this case, they'll return EINTR, indicating that the system call needs to be restarted. (The situation is a little more complicated than this with SA_RESTART, but you can read man 7 signal if you like.) The short of it is that you need to catch EINTR and restart the call for these system calls: * read, readv, write, writev, ioctl * open() when dealing with a fifo * wait* * Anything socket based (send*, recv*, connect, accept etc) * flock and lock control with fcntl * mq_ functions which can block * futex * sem_wait (and timed wait) * pause, sigsuspend, sigtimedwait, sigwaitinfo * poll, epoll_wait, select and 'p' versions of the same * msgrcv, msgsnd, semop, semtimedop * close (although, on Linux, EINTR won't happen here) * any sleep functions (careful, you need to handle this are restart with different arguments) We've been a little sloppy with this until now. This patch adds a macro for dealing with this and corrects every case of these system calls (that I found). The macro is HANDLE_EINTR in base/eintr_wrapper.h. It's safe to include on Windows and is a no-op there. On POSIX, it uses GCC magic to return the correct type based on the expression and restarts the system call if it throws EINTR. And you can use it like: HANDLE_EINTR(close(fd)); Or: ssize_t bytes_read = HANDLE_EINTR(read(fd, buffer, len)); *BEWARE* that it will evaluate the argument multiple times, so this is not safe: HANDLE_EINTR(close(FireMissiles())); http://groups.google.com/group/chromium-dev/browse_thread/thread/41a35b2a457d73a0 http://codereview.chromium.org/100225 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15102 0039d316-1c4b-4281-b951-d872f2087c98
* ImportantFileWriterphajdan.jr@chromium.org2009-04-281-16/+6
| | | | | | | | | | | | | | Introducing a class for writing important files, preventing their corruption during writing. Switched PrefService to use it. Other classes will be switched in future changesets. TEST=This may affect things using preferences. Make sure that changes in preferences don't get lost, and that you don't get excessive disk activity when changing preferences. http://crbug.com/10618 Review URL: http://codereview.chromium.org/83001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14717 0039d316-1c4b-4281-b951-d872f2087c98
* Only check errno when it can be set.phajdan.jr@chromium.org2009-04-271-1/+1
| | | | | | | | This is a follow-up after http://codereview.chromium.org/77022 Review URL: http://codereview.chromium.org/99055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14602 0039d316-1c4b-4281-b951-d872f2087c98
* Submitting http://codereview.chromium.org/87039 on behalf of hamaji.erikkay@google.com2009-04-231-1/+17
| | | | | | Review URL: http://codereview.chromium.org/92053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14304 0039d316-1c4b-4281-b951-d872f2087c98
* Protect RandUint64 against EINTR.phajdan.jr@chromium.org2009-04-231-0/+12
| | | | | | Review URL: http://codereview.chromium.org/77022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14297 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 14152.thestig@chromium.org2009-04-211-2/+3
| | | | | | | TBR=tony Review URL: http://codereview.chromium.org/87066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14154 0039d316-1c4b-4281-b951-d872f2087c98
* Stop using and remove deprecated file_util::TrimTrailingSeparator().thestig@chromium.org2009-04-211-3/+2
| | | | | | Review URL: http://codereview.chromium.org/67271 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14152 0039d316-1c4b-4281-b951-d872f2087c98
* Implement file_util::CountFilesCreatedAfter() for posix environments.evan@chromium.org2009-04-211-0/+30
| | | | | | | | | BUG=9833 Review URL: http://codereview.chromium.org/87003 Patch from Shinichiro Hamaji <hamaji@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14081 0039d316-1c4b-4281-b951-d872f2087c98
* Use "org.chromium" in place of "com.google.chrome" in posix temporary file ↵estade@chromium.org2009-03-171-0/+4
| | | | | | | | names for non-chrome builds. Review URL: http://codereview.chromium.org/46087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11897 0039d316-1c4b-4281-b951-d872f2087c98
* Implement DownloadFile::Rename() for posix. Downloads work on linux!estade@chromium.org2009-03-131-2/+8
| | | | | | Review URL: http://codereview.chromium.org/46020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11659 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup in {test_,}file_util_posix.ccphajdan.jr@chromium.org2009-03-061-3/+6
| | | | | | | | | | - DCHECK_EQ instead of DCHECK(foo == bar) - more detailed log error messages - add a comment why we use 0777 permissions for new dirs (umask should produce sane permissions) Review URL: http://codereview.chromium.org/40162 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11105 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 11102.phajdan.jr@chromium.org2009-03-061-6/+3
| | | | | | | | | | Used git svn dcommit instead of git cl dcommit by mistake. Reverting to re-commit properly. TBR=erikkay Review URL: http://codereview.chromium.org/40213 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11104 0039d316-1c4b-4281-b951-d872f2087c98
* first cutphajdan.jr@chromium.org2009-03-061-3/+6
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11102 0039d316-1c4b-4281-b951-d872f2087c98
* Properly honor base::SharedMemory semantics for name="" to meanjrg@chromium.org2009-02-041-14/+48
| | | | | | | | | | | | new/private shared memory on POSIX. Transition base::SharedMemory implementation to file/mmap() to prevent leaking of wired kernel resources and allow easier cleanup. Enable one more shared_memory unit test for POSIX. Enable stats_table_unittest.cc for Mac, and modify it so it cleans up. Review URL: http://codereview.chromium.org/19724 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9114 0039d316-1c4b-4281-b951-d872f2087c98