OLD | NEW |
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 #include "chrome/app/chrome_watcher_command_line_win.h" | 5 #include "chrome/app/chrome_watcher_command_line_win.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 const std::string& switch_name) { | 46 const std::string& switch_name) { |
47 return reinterpret_cast<HANDLE>(ReadUintSwitch(command_line, switch_name)); | 47 return reinterpret_cast<HANDLE>(ReadUintSwitch(command_line, switch_name)); |
48 } | 48 } |
49 | 49 |
50 } // namespace | 50 } // namespace |
51 | 51 |
52 ChromeWatcherCommandLineGenerator::ChromeWatcherCommandLineGenerator( | 52 ChromeWatcherCommandLineGenerator::ChromeWatcherCommandLineGenerator( |
53 const base::FilePath& chrome_exe) : chrome_exe_(chrome_exe) { | 53 const base::FilePath& chrome_exe) : chrome_exe_(chrome_exe) { |
54 } | 54 } |
55 | 55 |
| 56 ChromeWatcherCommandLineGenerator::~ChromeWatcherCommandLineGenerator() { |
| 57 } |
| 58 |
56 bool ChromeWatcherCommandLineGenerator::SetOnInitializedEventHandle( | 59 bool ChromeWatcherCommandLineGenerator::SetOnInitializedEventHandle( |
57 HANDLE on_initialized_event_handle) { | 60 HANDLE on_initialized_event_handle) { |
58 return SetHandle(on_initialized_event_handle, &on_initialized_event_handle_); | 61 return SetHandle(on_initialized_event_handle, &on_initialized_event_handle_); |
59 } | 62 } |
60 | 63 |
61 bool ChromeWatcherCommandLineGenerator::SetParentProcessHandle( | 64 bool ChromeWatcherCommandLineGenerator::SetParentProcessHandle( |
62 HANDLE parent_process_handle) { | 65 HANDLE parent_process_handle) { |
63 return SetHandle(parent_process_handle, &parent_process_handle_); | 66 return SetHandle(parent_process_handle, &parent_process_handle_); |
64 } | 67 } |
65 | 68 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 !parent_process->IsValid()) { | 204 !parent_process->IsValid()) { |
202 // If one was valid and not the other, free the valid one. | 205 // If one was valid and not the other, free the valid one. |
203 on_initialized_event->Close(); | 206 on_initialized_event->Close(); |
204 parent_process->Close(); | 207 parent_process->Close(); |
205 *main_thread_id = 0; | 208 *main_thread_id = 0; |
206 return false; | 209 return false; |
207 } | 210 } |
208 | 211 |
209 return true; | 212 return true; |
210 } | 213 } |
OLD | NEW |