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

Side by Side Diff: chrome/app/chrome_watcher_command_line_win.h

Issue 1578843002: Add missing destructor to ChromeWatcherCommandLineGenerator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/app/chrome_watcher_command_line_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <vector> 9 #include <vector>
10 10
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/win/scoped_handle.h" 14 #include "base/win/scoped_handle.h"
15 15
16 // Class for configuring the Chrome watcher process via the command-line. This 16 // Class for configuring the Chrome watcher process via the command-line. This
17 // accepts configuration from the parent process and generates the required 17 // accepts configuration from the parent process and generates the required
18 // command-line. 18 // command-line.
19 // 19 //
20 // It provides functionality for the common task of sharing handles from a 20 // It provides functionality for the common task of sharing handles from a
21 // parent to a child process, automatically duplicating them with the 21 // parent to a child process, automatically duplicating them with the
22 // appropriate permissions. These handles are closed when the generator is 22 // appropriate permissions. These handles are closed when the generator is
23 // destroyed so the generator must outlive the process creation. 23 // destroyed so the generator must outlive the process creation.
24 class ChromeWatcherCommandLineGenerator { 24 class ChromeWatcherCommandLineGenerator {
25 public: 25 public:
26 explicit ChromeWatcherCommandLineGenerator(const base::FilePath& chrome_exe); 26 explicit ChromeWatcherCommandLineGenerator(const base::FilePath& chrome_exe);
27 ~ChromeWatcherCommandLineGenerator();
27 28
28 // Sets a handle to be shared with the child process. This will duplicate the 29 // Sets a handle to be shared with the child process. This will duplicate the
29 // handle with the inherit flag, with this object retaining ownership of the 30 // handle with the inherit flag, with this object retaining ownership of the
30 // duplicated handle. As such, this object must live at least until after the 31 // duplicated handle. As such, this object must live at least until after the
31 // watcher process has been created. Returns true on success, false on 32 // watcher process has been created. Returns true on success, false on
32 // failure. This can fail if the call to DuplicateHandle fails. Each of these 33 // failure. This can fail if the call to DuplicateHandle fails. Each of these
33 // may only be called once. 34 // may only be called once.
34 bool SetOnInitializedEventHandle(HANDLE on_initialized_event_handle); 35 bool SetOnInitializedEventHandle(HANDLE on_initialized_event_handle);
35 bool SetParentProcessHandle(HANDLE parent_process_handle_); 36 bool SetParentProcessHandle(HANDLE parent_process_handle_);
36 37
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // before returning them. Returns true if all parameters are successfully parsed 117 // before returning them. Returns true if all parameters are successfully parsed
117 // and false otherwise. In case of partial failure, any successfully parsed 118 // and false otherwise. In case of partial failure, any successfully parsed
118 // HANDLEs will be closed. 119 // HANDLEs will be closed.
119 bool InterpretChromeWatcherCommandLine( 120 bool InterpretChromeWatcherCommandLine(
120 const base::CommandLine& command_line, 121 const base::CommandLine& command_line,
121 base::win::ScopedHandle* parent_process, 122 base::win::ScopedHandle* parent_process,
122 DWORD* main_thread_id, 123 DWORD* main_thread_id,
123 base::win::ScopedHandle* on_initialized_event); 124 base::win::ScopedHandle* on_initialized_event);
124 125
125 #endif // CHROME_APP_CHROME_WATCHER_COMMAND_LINE_WIN_H_ 126 #endif // CHROME_APP_CHROME_WATCHER_COMMAND_LINE_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/app/chrome_watcher_command_line_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698