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

Side by Side 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: Review feedback. Created 5 years, 10 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 (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 #ifndef CHROME_APP_CHROME_WATCHER_COMMAND_LINE_WIN_H_ 5 #ifndef CHROME_APP_CHROME_WATCHER_COMMAND_LINE_WIN_H_
6 #define CHROME_APP_CHROME_WATCHER_COMMAND_LINE_WIN_H_ 6 #define CHROME_APP_CHROME_WATCHER_COMMAND_LINE_WIN_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include "base/win/scoped_handle.h" 10 #include "base/win/scoped_handle.h"
11 11
12 namespace base { 12 namespace base {
13 class CommandLine; 13 class CommandLine;
14 class FilePath; 14 class FilePath;
15 } // namespace base 15 } // namespace base
16 16
17 // Generates a CommandLine that will launch |chrome_exe| in Chrome Watcher mode 17 // Generates a CommandLine that will launch |chrome_exe| in Chrome Watcher mode
18 // to observe |parent_process|. 18 // to observe |parent_process|. The watcher process will signal
19 // |on_initialized_event| when its initialization is complete.
19 base::CommandLine GenerateChromeWatcherCommandLine( 20 base::CommandLine GenerateChromeWatcherCommandLine(
20 const base::FilePath& chrome_exe, 21 const base::FilePath& chrome_exe,
21 HANDLE parent_process); 22 HANDLE parent_process,
23 HANDLE on_initialized_event);
22 24
23 // Interprets the Command Line used to launch a Chrome Watcher process and 25 // Interprets the Command Line used to launch a Chrome Watcher process and
24 // extracts the parent process HANDLE. Verifies that the handle is usable in 26 // extracts the parent process and initialization event HANDLEs. Verifies that
25 // this process before returning it, and returns NULL in case of a failure. 27 // the handles are usable in this process before returning them. Returns true if
26 base::win::ScopedHandle InterpretChromeWatcherCommandLine( 28 // both handles are successfully parsed and false otherwise. If only one of the
27 const base::CommandLine& command_line); 29 // handles can be parsed, it will be closed.
30 bool InterpretChromeWatcherCommandLine(
31 const base::CommandLine& command_line,
32 base::win::ScopedHandle* parent_process,
33 base::win::ScopedHandle* on_initialized_event);
28 34
29 #endif // CHROME_APP_CHROME_WATCHER_COMMAND_LINE_WIN_H_ 35 #endif // CHROME_APP_CHROME_WATCHER_COMMAND_LINE_WIN_H_
OLDNEW
« no previous file with comments | « chrome/app/chrome_watcher_command_line_unittest_win.cc ('k') | chrome/app/chrome_watcher_command_line_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698