#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop_proxy.h"
+#include "base/profiler/scoped_tracker.h"
#include "base/time/time.h"
#include "base/win/object_watcher.h"
// FilePathWatcher::PlatformDelegate overrides.
virtual bool Watch(const FilePath& path,
bool recursive,
- const FilePathWatcher::Callback& callback) OVERRIDE;
- virtual void Cancel() OVERRIDE;
+ const FilePathWatcher::Callback& callback) override;
+ virtual void Cancel() override;
// Deletion of the FilePathWatcher will call Cancel() to dispose of this
// object in the right thread. This also observes destruction of the required
// cleanup thread, in case it quits before Cancel() is called.
- virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
+ virtual void WillDestroyCurrentMessageLoop() override;
// Callback from MessageLoopForIO.
- virtual void OnObjectSignaled(HANDLE object);
+ virtual void OnObjectSignaled(HANDLE object) override;
private:
virtual ~FilePathWatcherImpl() {}
void DestroyWatch();
// Cleans up and stops observing the |message_loop_| thread.
- void CancelOnMessageLoopThread() OVERRIDE;
+ void CancelOnMessageLoopThread() override;
// Callback to notify upon changes.
FilePathWatcher::Callback callback_;
}
void FilePathWatcherImpl::OnObjectSignaled(HANDLE object) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION("FilePathWatcherImpl_OnObjectSignaled"));
+
DCHECK(object == handle_);
// Make sure we stay alive through the body of this function.
scoped_refptr<FilePathWatcherImpl> keep_alive(this);