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

Unified Diff: chrome/app/chrome_watcher_command_line_win.h

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: Add some comments. 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: chrome/app/chrome_watcher_command_line_win.h
diff --git a/chrome/app/chrome_watcher_command_line_win.h b/chrome/app/chrome_watcher_command_line_win.h
index 30ff98807a0a57ea6ab30f2d69a200609e3b99ad..800a4f0d2053b344448bb27a8d28a061bda31526 100644
--- a/chrome/app/chrome_watcher_command_line_win.h
+++ b/chrome/app/chrome_watcher_command_line_win.h
@@ -15,15 +15,21 @@ class FilePath;
} // namespace base
// Generates a CommandLine that will launch |chrome_exe| in Chrome Watcher mode
-// to observe |parent_process|.
+// to observe |parent_process|. The watcher process will signal
+// |on_initialized_event| when its initialization is completed.
grt (UTC plus 2) 2015/02/03 21:20:45 nit: "is complete" or "has completed"
erikwright (departed) 2015/02/03 21:56:47 Done.
base::CommandLine GenerateChromeWatcherCommandLine(
const base::FilePath& chrome_exe,
+ HANDLE on_initialized_event,
grt (UTC plus 2) 2015/02/03 21:20:45 based on the comment above, i'd swap on_initialize
erikwright (departed) 2015/02/03 21:26:02 We end up binding this to |chrome_exe|, and later
grt (UTC plus 2) 2015/02/04 03:04:47 It took me a really long time to understand what y
erikwright (departed) 2015/02/04 04:19:18 I reversed the order to make the public contract i
HANDLE parent_process);
// Interprets the Command Line used to launch a Chrome Watcher process and
-// extracts the parent process HANDLE. Verifies that the handle is usable in
-// this process before returning it, and returns NULL in case of a failure.
-base::win::ScopedHandle InterpretChromeWatcherCommandLine(
- const base::CommandLine& command_line);
+// extracts the parent process and initialization event HANDLEs. Verifies that
+// the handles are usable in this process before returning them. Returns true if
+// both handles are successfully parsed and false otherwise. If only one of the
+// handles can be parsed, it will be closed.
+bool InterpretChromeWatcherCommandLine(
+ const base::CommandLine& command_line,
+ base::win::ScopedHandle* on_initialized_event,
grt (UTC plus 2) 2015/02/03 21:20:45 i'd swap them here, too
erikwright (departed) 2015/02/03 21:26:02 Ordered for consistency with the above. If you co
+ base::win::ScopedHandle* parent_process);
#endif // CHROME_APP_CHROME_WATCHER_COMMAND_LINE_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698