| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_CHROME_WATCHER_CHROME_WATCHER_MAIN_API_H_ | 5 #ifndef CHROME_CHROME_WATCHER_CHROME_WATCHER_MAIN_API_H_ |
| 6 #define CHROME_CHROME_WATCHER_CHROME_WATCHER_MAIN_API_H_ | 6 #define CHROME_CHROME_WATCHER_CHROME_WATCHER_MAIN_API_H_ |
| 7 | 7 |
| 8 #include <Windows.h> | 8 #include <Windows.h> |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // Watches |parent_process|, whose main thread ID is |main_thread_id|, and | 22 // Watches |parent_process|, whose main thread ID is |main_thread_id|, and |
| 23 // records its exit code under |registry_path| in HKCU. A window named | 23 // records its exit code under |registry_path| in HKCU. A window named |
| 24 // |message_window_name|, owned by |parent_process|, will be monitored for | 24 // |message_window_name|, owned by |parent_process|, will be monitored for |
| 25 // responsiveness. If SyzyASAN is enabled, a Kasko reporter process is also | 25 // responsiveness. If SyzyASAN is enabled, a Kasko reporter process is also |
| 26 // instantiated, using |browser_data_directory| to store crash reports. | 26 // instantiated, using |browser_data_directory| to store crash reports. |
| 27 // |on_initialized_event| will be signaled once the watcher process is fully | 27 // |on_initialized_event| will be signaled once the watcher process is fully |
| 28 // initialized. Takes ownership of |parent_process| and |on_initialized_event|. | 28 // initialized. Takes ownership of |parent_process| and |on_initialized_event|. |
| 29 // |channel_name| is the current Chrome distribution channel (one of | 29 // |channel_name| is the current Chrome distribution channel (one of |
| 30 // installer::kChromeChannelXXX). | 30 // installer::kChromeChannelXXX). |
| 31 typedef int (*ChromeWatcherMainFunction)( | 31 typedef int (*ChromeWatcherMainFunction)( |
| 32 const base::char16* registry_path, | 32 const base::string16& registry_path, |
| 33 HANDLE parent_process, | 33 HANDLE parent_process, |
| 34 DWORD main_thread_id, | 34 DWORD main_thread_id, |
| 35 HANDLE on_initialized_event, | 35 HANDLE on_initialized_event, |
| 36 const base::char16* browser_data_directory, | 36 const base::char16* browser_data_directory, |
| 37 const base::char16* message_window_name, | 37 const base::char16* message_window_name, |
| 38 const base::char16* channel_name); | 38 const base::char16* channel_name); |
| 39 | 39 |
| 40 // Returns an RPC endpoint name for the identified client process. This method | 40 // Returns an RPC endpoint name for the identified client process. This method |
| 41 // may be invoked in both the client and the watcher process with the PID of the | 41 // may be invoked in both the client and the watcher process with the PID of the |
| 42 // client process to establish communication between the two using a common | 42 // client process to establish communication between the two using a common |
| 43 // endpoint name. | 43 // endpoint name. |
| 44 base::string16 GetKaskoEndpoint(base::ProcessId client_process_id); | 44 base::string16 GetKaskoEndpoint(base::ProcessId client_process_id); |
| 45 | 45 |
| 46 #endif // CHROME_CHROME_WATCHER_CHROME_WATCHER_MAIN_API_H_ | 46 #endif // CHROME_CHROME_WATCHER_CHROME_WATCHER_MAIN_API_H_ |
| OLD | NEW |