Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Side by Side Diff: components/browser_watcher/stability_paths.h

Issue 2910003002: Stability instrumentation: metrics for collection on crash (Closed)
Patch Set: address rkaplow comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 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_PATHS_H_ 5 #ifndef COMPONENTS_BROWSER_WATCHER_STABILITY_PATHS_H_
6 #define COMPONENTS_BROWSER_WATCHER_STABILITY_PATHS_H_ 6 #define COMPONENTS_BROWSER_WATCHER_STABILITY_PATHS_H_
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/process/process.h" 9 #include "base/process/process.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 17 matching lines...) Expand all
28 28
29 // On success, returns true and |path| contains the path to the stability file. 29 // On success, returns true and |path| contains the path to the stability file.
30 // On failure, returns false. 30 // On failure, returns false.
31 bool GetStabilityFileForProcess(const base::Process& process, 31 bool GetStabilityFileForProcess(const base::Process& process,
32 const base::FilePath& user_data_dir, 32 const base::FilePath& user_data_dir,
33 base::FilePath* path); 33 base::FilePath* path);
34 34
35 // Returns a pattern that matches file names returned by GetFileForProcess. 35 // Returns a pattern that matches file names returned by GetFileForProcess.
36 base::FilePath::StringType GetStabilityFilePattern(); 36 base::FilePath::StringType GetStabilityFilePattern();
37 37
38 // Marks the stability file for deletion. 38 // Sets the current process's stability file's state to deleted (via the
39 void MarkStabilityFileForDeletion(const base::FilePath& user_data_dir); 39 // GlobalActivityTracker) and opens the file for deletion. Metrics pertaining to
40 // stability recording are logged.
41 void MarkOwnStabilityFileDeleted(const base::FilePath& user_data_dir);
42
43 // Sets another process's stability file's state to deleted, then opens it for
44 // deletion. This function is meant for use by the crashpad handler; it logs
45 // metrics labelled as in the context of crash collection.
46 void MarkStabilityFileDeletedOnCrash(const base::FilePath& file_path);
40 47
41 #endif // defined(OS_WIN) 48 #endif // defined(OS_WIN)
42 49
43 } // namespace browser_watcher 50 } // namespace browser_watcher
44 51
45 #endif // COMPONENTS_BROWSER_WATCHER_STABILITY_PATHS_H_ 52 #endif // COMPONENTS_BROWSER_WATCHER_STABILITY_PATHS_H_
OLDNEW
« no previous file with comments | « components/browser_watcher/stability_metrics.cc ('k') | components/browser_watcher/stability_paths.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698