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

Unified Diff: components/browser_watcher/stability_paths.cc

Issue 2856923002: Rejig stability intstrumentation filenames and targets (Closed)
Patch Set: Missing include Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: components/browser_watcher/stability_paths.cc
diff --git a/components/browser_watcher/stability_debugging.cc b/components/browser_watcher/stability_paths.cc
similarity index 82%
copy from components/browser_watcher/stability_debugging.cc
copy to components/browser_watcher/stability_paths.cc
index c7919d2b773a8fe3c9bc2b14bf0b76e136e0e423..d8764166752db72ebbdf472b75f8e16f2be03889 100644
--- a/components/browser_watcher/stability_debugging.cc
+++ b/components/browser_watcher/stability_paths.cc
@@ -1,26 +1,23 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
+// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/browser_watcher/stability_debugging.h"
+#include "components/browser_watcher/stability_paths.h"
#include <string>
-#include "base/debug/activity_tracker.h"
#include "base/feature_list.h"
#include "base/files/file.h"
#include "base/metrics/persistent_memory_allocator.h"
-#include "base/path_service.h"
-#include "base/process/process.h"
#include "base/strings/stringprintf.h"
#include "base/time/time.h"
#include "components/browser_watcher/features.h"
-namespace browser_watcher {
+#if defined(OS_WIN)
+namespace browser_watcher {
namespace {
-#if defined(OS_WIN)
bool GetCreationTime(const base::Process& process, base::Time* time) {
DCHECK(time);
@@ -35,12 +32,9 @@ bool GetCreationTime(const base::Process& process, base::Time* time) {
*time = base::Time::FromFileTime(creation_time);
return true;
}
-#endif // defined(OS_WIN)
} // namespace
-#if defined(OS_WIN)
-
base::FilePath GetStabilityDir(const base::FilePath& user_data_dir) {
return user_data_dir.AppendASCII("Stability");
}
@@ -89,15 +83,7 @@ void MarkStabilityFileForDeletion(const base::FilePath& user_data_dir) {
base::File::FLAG_READ |
base::File::FLAG_DELETE_ON_CLOSE);
}
-#endif // defined(OS_WIN)
-
-void SetStabilityDataInt(base::StringPiece name, int64_t value) {
- base::debug::GlobalActivityTracker* global_tracker =
- base::debug::GlobalActivityTracker::Get();
- if (!global_tracker)
- return; // Activity tracking isn't enabled.
-
- global_tracker->process_data().SetInt(name, value);
-}
} // namespace browser_watcher
+
+#endif // defined(OS_WIN)
« no previous file with comments | « components/browser_watcher/stability_paths.h ('k') | components/browser_watcher/stability_report_extractor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698