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

Unified Diff: components/browser_watcher/watcher_client_win.cc

Issue 886613002: Introduce the ability to wait for the watcher process to initialize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: components/browser_watcher/watcher_client_win.cc
diff --git a/components/browser_watcher/watcher_client_win.cc b/components/browser_watcher/watcher_client_win.cc
index e055278839034731404114449c422e0ef06efe98..dd6182a391bac6a1778f223d0de90107ef58eaa3 100644
--- a/components/browser_watcher/watcher_client_win.cc
+++ b/components/browser_watcher/watcher_client_win.cc
@@ -48,6 +48,8 @@ void WatcherClient::LaunchWatcher() {
// Launch the child process inheriting only |self| on
// Vista and better.
to_inherit.push_back(self.Handle());
+ to_inherit.insert(to_inherit.end(), inherited_handles_.begin(),
+ inherited_handles_.end());
options.handles_to_inherit = &to_inherit;
}
@@ -56,4 +58,8 @@ void WatcherClient::LaunchWatcher() {
LOG(ERROR) << "Failed to launch browser watcher.";
}
+void WatcherClient::AddInheritedHandle(HANDLE handle) {
+ inherited_handles_.push_back(handle);
+}
+
} // namespace browser_watcher

Powered by Google App Engine
This is Rietveld 408576698