| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_BROWSER_WATCHER_STABILITY_DEBUGGING_H_ | 5 #ifndef COMPONENTS_BROWSER_WATCHER_STABILITY_DEBUGGING_H_ |
| 6 #define COMPONENTS_BROWSER_WATCHER_STABILITY_DEBUGGING_H_ | 6 #define COMPONENTS_BROWSER_WATCHER_STABILITY_DEBUGGING_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | |
| 11 #include "base/gtest_prod_util.h" | |
| 12 #include "base/process/process.h" | |
| 13 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
| 14 | 11 |
| 15 namespace browser_watcher { | 12 namespace browser_watcher { |
| 16 | 13 |
| 17 #if defined(OS_WIN) | |
| 18 | |
| 19 // Returns the the stability debugging directory. | |
| 20 base::FilePath GetStabilityDir(const base::FilePath& user_data_dir); | |
| 21 | |
| 22 // On success, |path| contains the path to the stability debugging information | |
| 23 // file for |process|. | |
| 24 bool GetStabilityFileForProcess(const base::Process& process, | |
| 25 const base::FilePath& user_data_dir, | |
| 26 base::FilePath* path); | |
| 27 | |
| 28 // Returns a pattern that matches file names returned by GetFileForProcess. | |
| 29 base::FilePath::StringType GetStabilityFilePattern(); | |
| 30 | |
| 31 // Marks the stability file for deletion. | |
| 32 void MarkStabilityFileForDeletion(const base::FilePath& user_data_dir); | |
| 33 | |
| 34 #endif // defined(OS_WIN) | |
| 35 | |
| 36 // Adds or updates the global stability user data. | 14 // Adds or updates the global stability user data. |
| 37 void SetStabilityDataInt(base::StringPiece name, int64_t value); | 15 void SetStabilityDataInt(base::StringPiece name, int64_t value); |
| 38 | 16 |
| 39 } // namespace browser_watcher | 17 } // namespace browser_watcher |
| 40 | 18 |
| 41 #endif // COMPONENTS_BROWSER_WATCHER_STABILITY_DEBUGGING_H_ | 19 #endif // COMPONENTS_BROWSER_WATCHER_STABILITY_DEBUGGING_H_ |
| OLD | NEW |