OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_BROWSER_WATCHER_STABILITY_PATHS_H_ |
| 6 #define COMPONENTS_BROWSER_WATCHER_STABILITY_PATHS_H_ |
| 7 |
| 8 #include "base/files/file_path.h" |
| 9 #include "base/process/process.h" |
| 10 |
| 11 #if defined(OS_WIN) |
| 12 #include <winsock2.h> |
| 13 #endif // defined(OS_WIN) |
| 14 |
| 15 namespace browser_watcher { |
| 16 |
| 17 // Returns the stability debugging directory. |
| 18 base::FilePath GetStabilityDir(const base::FilePath& user_data_dir); |
| 19 |
| 20 // Returns the stability debugging path, which is based on pid and creation time |
| 21 // to ensure unicity in the face of pid recycling. |
| 22 base::FilePath GetStabilityFileForProcess(base::ProcessId pid, |
| 23 timeval creation_time, |
| 24 const base::FilePath& user_data_dir); |
| 25 |
| 26 // On success, returns true and |path| contains the path to the stability file. |
| 27 // On failure, returns false. |
| 28 bool GetStabilityFileForProcess(const base::Process& process, |
| 29 const base::FilePath& user_data_dir, |
| 30 base::FilePath* path); |
| 31 |
| 32 // Returns a pattern that matches file names returned by GetFileForProcess. |
| 33 base::FilePath::StringType GetStabilityFilePattern(); |
| 34 |
| 35 // Marks the stability file for deletion. |
| 36 void MarkStabilityFileForDeletion(const base::FilePath& user_data_dir); |
| 37 |
| 38 } // namespace browser_watcher |
| 39 |
| 40 #endif // COMPONENTS_BROWSER_WATCHER_STABILITY_PATHS_H_ |
OLD | NEW |