Commit 9d4f3892 authored by Jesse McKenna's avatar Jesse McKenna Committed by Commit Bot

Move SystemSessionAnalyzer to subdir, add owners

This change moves SystemSessionAnalyzer to its own subdirectory and
adds the Chrome Windows team as owners.

SystemSessionAnalyzer queries Windows' logged events, and is used by
StabilityMetricsProvider to determine whether an unclean shutdown of
the browser process was caused by system instability (rather than
Chrome instability). Because this file is only tangentially related to
the metrics service in components/metrics, it makes sense for it to be
owned by the Windows team rather than the broader metrics team.

Change-Id: I61f2ed168db418b6368051f41aea19d3912b25be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2142135Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Reviewed-by: default avatarSigurður Ásgeirsson <siggi@chromium.org>
Commit-Queue: Jesse McKenna <jessemckenna@google.com>
Cr-Commit-Position: refs/heads/master@{#757885}
parent 72504c41
......@@ -9,7 +9,7 @@
#include "base/logging.h"
#include "base/strings/stringprintf.h"
#include "base/time/time.h"
#include "components/metrics/system_session_analyzer_win.h"
#include "components/metrics/system_session_analyzer/system_session_analyzer_win.h"
namespace {
......
......@@ -119,8 +119,6 @@ jumbo_static_library("metrics") {
"stability_metrics_provider.h",
"system_memory_stats_recorder.h",
"system_memory_stats_recorder_linux.cc",
"system_session_analyzer_win.cc",
"system_session_analyzer_win.h",
"ukm_demographic_metrics_provider.h",
"unsent_log_store.cc",
"unsent_log_store.h",
......@@ -165,6 +163,10 @@ jumbo_static_library("metrics") {
}
if (is_win) {
sources += [
"system_session_analyzer/system_session_analyzer_win.cc",
"system_session_analyzer/system_session_analyzer_win.h",
]
sources -= [ "machine_id_provider_nonwin.cc" ]
deps += [ "//components/browser_watcher:stability_client" ]
libs = [ "wevtapi.lib" ]
......@@ -418,7 +420,6 @@ source_set("unit_tests") {
"single_sample_metrics_factory_impl_unittest.cc",
"stability_metrics_helper_unittest.cc",
"stability_metrics_provider_unittest.cc",
"system_session_analyzer_win_unittest.cc",
"ui/screen_info_metrics_provider_unittest.cc",
"unsent_log_store_unittest.cc",
]
......@@ -452,7 +453,10 @@ source_set("unit_tests") {
if (is_win) {
sources -= [ "machine_id_provider_nonwin_unittest.cc" ]
sources += [ "machine_id_provider_win_unittest.cc" ]
sources += [
"machine_id_provider_win_unittest.cc",
"system_session_analyzer/system_session_analyzer_win_unittest.cc",
]
}
if (is_linux) {
......
......@@ -18,7 +18,7 @@
#include "base/android/build_info.h"
#endif
#if defined(OS_WIN)
#include "components/metrics/system_session_analyzer_win.h"
#include "components/metrics/system_session_analyzer/system_session_analyzer_win.h"
#endif
namespace metrics {
......
davidbienvenu@chromium.org
jessemckenna@google.com
# COMPONENT: Internals>Metrics
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/metrics/system_session_analyzer_win.h"
#include "components/metrics/system_session_analyzer/system_session_analyzer_win.h"
#include "base/stl_util.h"
#include "base/time/time.h"
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_BROWSER_WATCHER_SYSTEM_SESSION_ANALYZER_WIN_H_
#define COMPONENTS_BROWSER_WATCHER_SYSTEM_SESSION_ANALYZER_WIN_H_
#ifndef COMPONENTS_METRICS_SYSTEM_SESSION_ANALYZER_SYSTEM_SESSION_ANALYZER_WIN_H_
#define COMPONENTS_METRICS_SYSTEM_SESSION_ANALYZER_SYSTEM_SESSION_ANALYZER_WIN_H_
#include <windows.h>
#include <winevt.h>
......@@ -132,4 +132,4 @@ class SystemSessionAnalyzer {
} // namespace metrics
#endif // COMPONENTS_BROWSER_WATCHER_SYSTEM_SESSION_ANALYZER_WIN_H_
#endif // COMPONENTS_METRICS_SYSTEM_SESSION_ANALYZER_SYSTEM_SESSION_ANALYZER_WIN_H_
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/metrics/system_session_analyzer_win.h"
#include "components/metrics/system_session_analyzer/system_session_analyzer_win.h"
#include <algorithm>
#include <utility>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment