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

Side by Side Diff: mojo/public/cpp/system/watcher.cc

Issue 2076543002: Gender-neutralize even more pronouns. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/public/cpp/system/watcher.h" 5 #include "mojo/public/cpp/system/watcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 124
125 // static 125 // static
126 void Watcher::CallOnHandleReady(uintptr_t context, 126 void Watcher::CallOnHandleReady(uintptr_t context,
127 MojoResult result, 127 MojoResult result,
128 MojoHandleSignalsState signals_state, 128 MojoHandleSignalsState signals_state,
129 MojoWatchNotificationFlags flags) { 129 MojoWatchNotificationFlags flags) {
130 // NOTE: It is safe to assume the Watcher still exists because this callback 130 // NOTE: It is safe to assume the Watcher still exists because this callback
131 // will never be run after the Watcher's destructor. 131 // will never be run after the Watcher's destructor.
132 // 132 //
133 // TODO: Maybe we should also expose |signals_state| throught he Watcher API. 133 // TODO: Maybe we should also expose |signals_state| through the Watcher API.
134 // Current HandleWatcher users have no need for it, so it's omitted here. 134 // Current HandleWatcher users have no need for it, so it's omitted here.
135 Watcher* watcher = reinterpret_cast<Watcher*>(context); 135 Watcher* watcher = reinterpret_cast<Watcher*>(context);
136 if ((flags & MOJO_WATCH_NOTIFICATION_FLAG_FROM_SYSTEM) && 136 if ((flags & MOJO_WATCH_NOTIFICATION_FLAG_FROM_SYSTEM) &&
137 watcher->task_runner_->RunsTasksOnCurrentThread() && 137 watcher->task_runner_->RunsTasksOnCurrentThread() &&
138 watcher->is_default_task_runner_) { 138 watcher->is_default_task_runner_) {
139 // System notifications will trigger from the task runner passed to 139 // System notifications will trigger from the task runner passed to
140 // mojo::edk::InitIPCSupport(). In Chrome this happens to always be the 140 // mojo::edk::InitIPCSupport(). In Chrome this happens to always be the
141 // default task runner for the IO thread. 141 // default task runner for the IO thread.
142 watcher->OnHandleReady(result); 142 watcher->OnHandleReady(result);
143 } else { 143 } else {
144 watcher->task_runner_->PostTask( 144 watcher->task_runner_->PostTask(
145 FROM_HERE, 145 FROM_HERE,
146 base::Bind(&Watcher::OnHandleReady, watcher->weak_self_, result)); 146 base::Bind(&Watcher::OnHandleReady, watcher->weak_self_, result));
147 } 147 }
148 } 148 }
149 149
150 } // namespace mojo 150 } // namespace mojo
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | ui/app_list/views/app_list_drag_and_drop_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698