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

Unified Diff: chrome/app/mash/mash_runner.cc

Issue 2718123003: mash: Store chrome --mash crash key metadata in shared memory
Patch Set: rebase Created 3 years, 10 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: chrome/app/mash/mash_runner.cc
diff --git a/chrome/app/mash/mash_runner.cc b/chrome/app/mash/mash_runner.cc
index d5086ec61003d95db27dc5df9b8bf95cdd6fc551..9f750b40685ef85bb8b45eced983e21775ebb70f 100644
--- a/chrome/app/mash/mash_runner.cc
+++ b/chrome/app/mash/mash_runner.cc
@@ -56,6 +56,10 @@
#include "ui/base/ui_base_paths.h"
#include "ui/base/ui_base_switches.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/app/mash/mash_crash_keys.h"
+#endif // defined(OS_CHROMEOS)
+
using service_manager::mojom::ServiceFactory;
namespace {
@@ -145,9 +149,20 @@ void OnInstanceQuitInMain(base::RunLoop* run_loop,
} // namespace
-MashRunner::MashRunner() {}
+MashRunner::MashRunner() {
+#if defined(OS_CHROMEOS)
+ // NOTE: On Chrome OS, crash reporting for the root process and non-browser
+ // service processes is handled by the OS-level crash_reporter, not in-process
+ // breakpad. It therefore uses its own crash key implementation.
+ mash_crash_keys::Initialize();
hashimoto 2017/03/02 07:42:23 How about putting this code in MashMain or RunMain
+#endif
+}
-MashRunner::~MashRunner() {}
+MashRunner::~MashRunner() {
hashimoto 2017/03/02 07:42:23 ditto. Other shutdown code is in RunMain().
+#if defined(OS_CHROMEOS)
+ mash_crash_keys::Shutdown();
+#endif
+}
int MashRunner::Run() {
base::TaskScheduler::CreateAndSetSimpleTaskScheduler(
@@ -257,8 +272,6 @@ int MashMain() {
#if !defined(OFFICIAL_BUILD)
// Initialize stack dumping before initializing sandbox to make sure symbol
// names in all loaded libraries will be cached.
- // NOTE: On Chrome OS, crash reporting for the root process and non-browser
- // service processes is handled by the OS-level crash_reporter.
hashimoto 2017/03/02 07:42:23 IMO we still need this comment here to describe ho
base::debug::EnableInProcessStackDumping();
#endif

Powered by Google App Engine
This is Rietveld 408576698