summaryrefslogtreecommitdiffstats
path: root/base/files/file_path_watcher_linux.cc
Commit message (Collapse)AuthorAgeFilesLines
* Linux: Implement recursive file watching.thestig@chromium.org2014-05-131-23/+178
| | | | | | | | | | Also fix catching file attribute changes. BUG=78043 Review URL: https://codereview.chromium.org/275543007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270165 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up the Linux FileWatcher implementation.thestig@chromium.org2014-04-261-123/+143
| | | | | | Review URL: https://codereview.chromium.org/250833003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266387 0039d316-1c4b-4281-b951-d872f2087c98
* Move more file_util functions to base namespace.brettw@chromium.org2013-12-041-1/+1
| | | | | | | | | | | | This moves DevicePathToDriveLetterPath, NormalizeToNativeFilePath, IsLink, and GetFileInfo. This also removes some explicit "base::" usage in base files I touched. TBR=jam Review URL: https://codereview.chromium.org/105293002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238763 0039d316-1c4b-4281-b951-d872f2087c98
* Move Posix file utils to the base namespace.brettw@chromium.org2013-11-271-14/+14
| | | | | | | | | BUG= R=rvargas@chromium.org Review URL: https://codereview.chromium.org/89523002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237642 0039d316-1c4b-4281-b951-d872f2087c98
* FilePathWatcherLinux should be more verbose if inotify_init() fails.thestig@chromium.org2013-11-261-0/+3
| | | | | | | | | R=benwells@chromium.org TBR=mnissler@chromium.org Review URL: https://codereview.chromium.org/87033002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237247 0039d316-1c4b-4281-b951-d872f2087c98
* TraceLog::SetCurrentThreadBlocksMessageLoop()wangxianzhu@chromium.org2013-10-221-0/+3
| | | | | | | | | | | | | | | | | - When some thread doesn't respond the flush request in time, output the thread name, and suggest calling SetCurrentThreadBlocksMessageLoop from the thread. - For a thread which calls SetCurrentThreadBlocksMessageLoop, trace events from the thread will be added into the main buffer directly, without using the thread local buffer. TEST=TraceEventTestFixture.CurrentThreadBlocksMessageLoop BUG=trace-viewer:486 Review URL: https://codereview.chromium.org/29803002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230012 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of the message_loop header in base/.avi@chromium.org2013-07-181-1/+1
| | | | | | | | | | BUG=260807 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/19224003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212281 0039d316-1c4b-4281-b951-d872f2087c98
* Move PathExists to base namespace.brettw@chromium.org2013-07-111-1/+1
| | | | | | | | | BUG= TBR=jam@chromium.org Review URL: https://codereview.chromium.org/18286004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211147 0039d316-1c4b-4281-b951-d872f2087c98
* Rename base/hash_tables to base/containers/hash_tables.brettw@chromium.org2013-06-111-1/+1
| | | | | | | | | | | Remove forwarding header BUG= R=avi@chromium.org Review URL: https://codereview.chromium.org/16667019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205584 0039d316-1c4b-4281-b951-d872f2087c98
* Call scoped_refptr<T>::get() rather than relying on implicit "operator T*"rsleevi@chromium.org2013-06-111-1/+1
| | | | | | | | | | | | | | | | | | | This upates calls to bound temporary objects to also use get(). While it has the same semantic equivalence to the existing code, this generally represents a dangerous pattern - indeed, part of the whole motivation for this change is to make this anti-pattern very visible to authors. This change simply updates all of the call sites, to allow the "operator T*" to be removed and preventing new instances. The existing instances will then be reviewed for "suspicious" changes and updated to use/pass scoped_refptr<T> rather than T*, as appropriate. BUG=110610 TBR=darin Review URL: https://codereview.chromium.org/15984016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205560 0039d316-1c4b-4281-b951-d872f2087c98
* Update includes of message_loop_proxy.brettw@chromium.org2013-06-101-1/+1
| | | | | | | | | | | This keeps the forwarding header, just updates all current callers. BUG= R=avi@chromium.org Review URL: https://codereview.chromium.org/16514006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205306 0039d316-1c4b-4281-b951-d872f2087c98
* Move file_path.h to base/files.brettw@chromium.org2013-02-241-1/+1
| | | | | | TBR=sky git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184344 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the base::files:: namespace.darin@chromium.org2013-01-151-2/+0
| | | | | | Review URL: https://chromiumcodereview.appspot.com/11876031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176836 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate FilePathWatcher::Delegate.darin@chromium.org2013-01-151-12/+11
| | | | | | | | BUG=130980 Review URL: https://codereview.chromium.org/11876025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176768 0039d316-1c4b-4281-b951-d872f2087c98
* (1) Added a recursive boolean param to FilePathWatcher::Watch() function to ↵kmadhusu@chromium.org2012-12-051-0/+7
| | | | | | | | | | | | | | | watch for sub directory tree changes. Fixed all the calling sites. (2) Added support to watch sub trees on Windows. (3) Added FilePathWatcherTest.RecursiveWatch browser test. BUG=144491 TEST=none Review URL: https://chromiumcodereview.appspot.com/11415066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171097 0039d316-1c4b-4281-b951-d872f2087c98
* Move eintr_wrapper.h from base to base/posixbrettw@chromium.org2012-11-141-1/+1
| | | | | | Review URL: https://codereview.chromium.org/11366229 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167739 0039d316-1c4b-4281-b951-d872f2087c98
* Make InotifyReader a leaky lazy instance.hshi@chromium.org2012-10-181-1/+1
| | | | | | | | | | | | | | | Fix a lifetime problem with the lazy instance InotifyReader and the singleton PluginService. The PluginService has an indirect dependency on InotifyReader on Linux. By making InotifyReader a leaky lazy instance, we can avoid releasing the inotify file descriptors while there are still registered watchers. BUG=156110 TEST=CQ, manual test Review URL: https://chromiumcodereview.appspot.com/11183043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162582 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a couple small problems in base/thestig@chromium.org2012-10-121-1/+1
| | | | | | Review URL: https://chromiumcodereview.appspot.com/11118004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161510 0039d316-1c4b-4281-b951-d872f2087c98
* Enable file path watcher for Androidyongsheng.zhu@intel.com2012-08-311-3/+3
| | | | | | | | | | | | | | Use the linux implementation for file path watcher because Android supports 'inotify'. This fixes the failed case UserStyleSheetWatcherTest.StyleLoad. BUG=139412 TEST=run_tests.py -s unit_tests Review URL: https://chromiumcodereview.appspot.com/10874083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154387 0039d316-1c4b-4281-b951-d872f2087c98
* base: Add missing "virtual" keyword and OVERRIDE to some methods.tfarina@chromium.org2012-07-311-1/+1
| | | | | | | | | | | | | | | Found with: $ ./build/gyp_chromium -Dclang=1 -Dclang_use_chrome_plugins=1 $ ninja -C out/Debug base -k4 -j4 2>&1 | tee errors And a tweak in plugin_flags.sh BUG=115047 R=willchan@chromium.org Review URL: https://chromiumcodereview.appspot.com/10834060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149109 0039d316-1c4b-4281-b951-d872f2087c98
* RefCounted types should not have public destructors, base/ editionrsleevi@chromium.org2012-04-251-1/+2
| | | | | | | | | | BUG=123295 TEST=none Review URL: http://codereview.chromium.org/10065037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133825 0039d316-1c4b-4281-b951-d872f2087c98
* [Coverity] Check return value.craig.schlenter@chromium.org2012-04-051-17/+18
| | | | | | | | | | | CID=101407 BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/9956064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130924 0039d316-1c4b-4281-b951-d872f2087c98
* Remove a unused parameter in the Linux FilePathWatcher implementation.thestig@chromium.org2012-03-131-18/+11
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/9553007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126359 0039d316-1c4b-4281-b951-d872f2087c98
* Remove task.h and finish base::Bind() migration.ajwong@chromium.org2012-01-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Over 341 CLs, in ~3 months, touching 3251 unique files! Top 5 most CLs: (121) jhawkins ( 45) dcheng ( 24) achuith ( 23) csilv ( 12) tfarina ( 12) groby ~1000 files touched: (918) jhawkins 100+ files touched: (486) ajwong (385) willchan (372) dcheng (126) csilv (123) fischman (112) sergeyu 49+ files touched: (65) tfarina (57) acolwell (52) adamk (49) tzik BUG=35223 TEST=existing Review URL: http://codereview.chromium.org/9114020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116748 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Remove Task.jhawkins@chromium.org2012-01-051-63/+50
| | | | | | | | | | BUG=none TEST=none R=awong Review URL: http://codereview.chromium.org/9086002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116439 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Convert FilePathWatcher.jhawkins@chromium.org2011-11-231-1/+2
| | | | | | | | | | | BUG=none TEST=none R=willchan@chromium.org Review URL: http://codereview.chromium.org/8677015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111405 0039d316-1c4b-4281-b951-d872f2087c98
* Add CHECKs for file descriptors used in select() by InotifyReaderTaskmnissler@chromium.org2011-11-231-0/+5
| | | | | | | | | | | | Since these are used in an fd_set, there's the possibility that invalid file descriptors cause stack overflow/corruption. BUG=chromium:105162 TEST=No functional changes, compiles and passes tests. Review URL: http://codereview.chromium.org/8681006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111369 0039d316-1c4b-4281-b951-d872f2087c98
* Allow linker initialization of lazy instancejoth@chromium.org2011-11-151-2/+2
| | | | | | | | | | | | | | Using the initializer list construct = {0} allows the object to be linker initialized. Modify the LazyInstance class design to make it a pod aggregate type that can be linker initialized this way. Also combines the instance and state members, in line with the Singleton<> class design. Introduces a new LAZY_INSTANCE_INITIALIZER macro specifically for using to init all lazy instances + modify all existing callsites to use it. (Old code would no longer compile) BUG=94925 TEST=existing tests pass. http://build.chromium.org/f/chromium/perf/linux-release/sizes/report.html?history=150&header=chrome-si&graph=chrome-si&rev=-1 should step downward. TBR=jam@chromium.org,rvargas@chromium.org,darin@chromium.org,ben@chromium.org,apatrick@chromium.org,akalin@chromium.org Review URL: http://codereview.chromium.org/8491043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110076 0039d316-1c4b-4281-b951-d872f2087c98
* Switch over to base::Bind for base/debug/trace_event_unittests and base/files/*.jbates@chromium.org2011-10-051-6/+7
| | | | | | Review URL: http://codereview.chromium.org/8115013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104117 0039d316-1c4b-4281-b951-d872f2087c98
* Delete Tracked, and move Location to its own file.ajwong@chromium.org2011-09-211-0/+1
| | | | | | | | | | | | | The Birth/Death tracking of tasks has been moved out-of-band into MessageLoop's PendingTask structure. Thus, Task no longer needs to inherit from Tracked. Since Task was the only child of Tracked, delete the Tracked class and move Location to its own file. BUG=none TEST=builds Review URL: http://codereview.chromium.org/7879006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102132 0039d316-1c4b-4281-b951-d872f2087c98
* [Linux] Make FilePathWatcher somewhat more symlink aware.craig.schlenter@chromium.org2011-09-051-33/+63
| | | | | | | | | | | This is still broken in a variety of ways. BUG=91561 TEST=updated FilePathWatcher tests and manual testing Review URL: http://codereview.chromium.org/7583034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99657 0039d316-1c4b-4281-b951-d872f2087c98
* Mirror Windows implementation of CancelOnMessageLoopThread.dominich@chromium.org2011-08-181-9/+11
| | | | | | | | | | | | | | Before this change, there was a code path where the FilePathWatcher could have been canceled but the delegate_ was not set to NULL. At exit, the destructor would then call Cancel() which would try to post a task to the message loop. With this change, the delegate is correctly set to NULL when the MessageLoop is destroyed even if the FilePathWatcher itself has been canceled. This allows Cancel() from the destructor to do the right thing and not call into the MessageLoop. This implementation matches the Windows version which does not crash. BUG=83190 TEST=FilePathWatcherTest.* Review URL: http://codereview.chromium.org/7655028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97248 0039d316-1c4b-4281-b951-d872f2087c98
* Add MessageLoopProxy::currentnduca@chromium.org2011-08-151-1/+1
| | | | | | Review URL: http://codereview.chromium.org/7583053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96819 0039d316-1c4b-4281-b951-d872f2087c98
* Move FilePathWatcher to base/files.craig.schlenter@chromium.org2011-04-141-0/+462
FilePathWatcher is going to be used in future for monitoring changes to /etc/resolv.conf so it needs live somewhere where various consumers can get at it without incurring the wrath of the layering gods. TEST=existing tests BUG=67734 Review URL: http://codereview.chromium.org/6793020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81606 0039d316-1c4b-4281-b951-d872f2087c98