Mirror Windows implementation of CancelOnMessageLoopThread.

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


CrOS-Libchrome-Original-Commit: f8a3f1375a5571da9d061aaf5bb816cab7d6ba29
1 file changed
tree: 8820c459ac9a513d81af615c1cd1f8ecba97407e
  1. base/
  2. build/
  3. dbus/
  4. ipc/
  5. testing/
  6. third_party/