Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Issue 2598753002: Allow ObjectWatcher to be used from sequenced tasks. (Closed)

Created:
4 years ago by fdoray
Modified:
4 years ago
Reviewers:
grt (UTC plus 2)
CC:
chromium-reviews, grt+watch_chromium.org, vmpstr+watch_chromium.org, wfh+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow ObjectWatcher to be used from sequenced tasks. Previously, ObjectWatcher could only be used from single-threaded tasks. Watchers were notified on the thread from which they were registered. With this CL, ObjectWatcher can also be used from sequenced tasks. Watchers will be notified on the sequence from which they were registered. Note that since SequencedTaskRunnerHandle behaves the same way as ThreadTaskRunnerHandle when used from a single-threaded task or outside of any task, this CL does not change the behavior of existing ObjectWatcher::StartWatching*() call sites (those are necessarily in single-threaded tasks or outside of any task; otherwise the DCHECK(ThreadTaskRunnerHandle::IsSet()) in ObjectWatcher::StartWatchingInternal would fail). BUG=675631 Committed: https://crrev.com/0838b883b2a89bbfa6b1f845e0dfd5765781bc07 Cr-Commit-Position: refs/heads/master@{#440519}

Patch Set 1 #

Patch Set 2 : self-review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -18 lines) Patch
M base/win/object_watcher.h View 1 5 chunks +11 lines, -12 lines 0 comments Download
M base/win/object_watcher.cc View 3 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 21 (14 generated)
fdoray
PTAL
4 years ago (2016-12-22 13:17:06 UTC) #9
grt (UTC plus 2)
I only looked at one consumer of ObjectWatcher -- I think FilePathWatcher has a one-thread ...
4 years ago (2016-12-22 14:25:07 UTC) #12
fdoray
On 2016/12/22 14:25:07, grt (UTC plus 1) wrote: > I only looked at one consumer ...
4 years ago (2016-12-22 14:48:34 UTC) #13
grt (UTC plus 2)
Thanks for the extra clarification. LGTM.
4 years ago (2016-12-22 20:44:18 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2598753002/20001
4 years ago (2016-12-22 22:10:30 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-12-22 22:14:53 UTC) #19
commit-bot: I haz the power
4 years ago (2016-12-22 22:21:04 UTC) #21
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/0838b883b2a89bbfa6b1f845e0dfd5765781bc07
Cr-Commit-Position: refs/heads/master@{#440519}

Powered by Google App Engine
This is Rietveld 408576698