blob: e8569417482c1c29443ceda4725fe09a3a8ac66d [file] [log] [blame]
manzagopf2322662016-09-27 11:39:591// Copyright 2016 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
manzagop6d149912016-12-19 20:17:095#ifndef COMPONENTS_BROWSER_WATCHER_STABILITY_DEBUGGING_H_
6#define COMPONENTS_BROWSER_WATCHER_STABILITY_DEBUGGING_H_
7
8#include <stdint.h>
manzagopf2322662016-09-27 11:39:599
10#include "base/files/file_path.h"
11#include "base/gtest_prod_util.h"
12#include "base/process/process.h"
manzagop6d149912016-12-19 20:17:0913#include "base/strings/string_piece.h"
manzagopf2322662016-09-27 11:39:5914
15namespace browser_watcher {
16
manzagop6d149912016-12-19 20:17:0917#if defined(OS_WIN)
18
manzagopf2322662016-09-27 11:39:5919// Returns the the stability debugging directory.
20base::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|.
24bool 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.
29base::FilePath::StringType GetStabilityFilePattern();
30
manzagop14aff5d2016-11-23 17:27:0031// Marks the stability file for deletion.
32void MarkStabilityFileForDeletion(const base::FilePath& user_data_dir);
33
manzagop6d149912016-12-19 20:17:0934#endif // defined(OS_WIN)
35
36// Adds or updates the global stability user data.
37void SetStabilityDataInt(base::StringPiece name, int64_t value);
38
manzagopf2322662016-09-27 11:39:5939} // namespace browser_watcher
40
manzagop6d149912016-12-19 20:17:0941#endif // COMPONENTS_BROWSER_WATCHER_STABILITY_DEBUGGING_H_