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

Unified Diff: base/debug/activity_analyzer.cc

Issue 2128683002: Collect unclean shutdown debug information (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tracker
Patch Set: Minimal collection to proto Created 4 years, 4 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: base/debug/activity_analyzer.cc
diff --git a/base/debug/activity_analyzer.cc b/base/debug/activity_analyzer.cc
index 54e566b31a98169bc42b0392f49a90d2411e1f1a..0bbcfe2298ecfc9831d6ce85d1b6e000d0533ab2 100644
--- a/base/debug/activity_analyzer.cc
+++ b/base/debug/activity_analyzer.cc
@@ -4,6 +4,8 @@
#include "base/debug/activity_analyzer.h"
+#include <utility>
bcwhite 2016/08/04 13:38:11 Why this?
manzagop (departed) 2016/08/10 15:59:51 It's where std::move is defined.
+
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/memory_mapped_file.h"
@@ -42,7 +44,9 @@ GlobalActivityAnalyzer::~GlobalActivityAnalyzer() {}
std::unique_ptr<GlobalActivityAnalyzer> GlobalActivityAnalyzer::CreateWithFile(
const FilePath& file_path) {
std::unique_ptr<MemoryMappedFile> mmfile(new MemoryMappedFile());
- mmfile->Initialize(file_path);
+ // Note: write access is required for snapshotting, which writes a sentinel to
+ // ensure the snapshot's consistency.
+ mmfile->Initialize(file_path, MemoryMappedFile::READ_WRITE);
if (!mmfile->IsValid())
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698