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

Unified Diff: chrome/browser/chrome_browser_field_trials_desktop.cc

Issue 2720353002: Flush stability file after initialization (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_field_trials_desktop.cc
diff --git a/chrome/browser/chrome_browser_field_trials_desktop.cc b/chrome/browser/chrome_browser_field_trials_desktop.cc
index 47715a06258dff1e92f36cdbb9c33c3b44687a00..e61c1fdb1e99607b5703e681eec2db9f281dd56e 100644
--- a/chrome/browser/chrome_browser_field_trials_desktop.cc
+++ b/chrome/browser/chrome_browser_field_trials_desktop.cc
@@ -175,6 +175,13 @@ void SetupStabilityDebugging() {
// Record information about chrome's module. We want this to be done early.
RecordChromeModuleInfo(global_tracker);
+
+ // Trigger a flush of the memory mapped file to maximize the chances of
+ // having a minimal amount of content in the stability file, even if
+ // the system crashes or loses power. Note: this does not flush the file
+ // metadata nor does it wait for the changes to be flushed to disk before
+ // returning.
+ ::FlushViewOfFile(global_tracker->allocator()->data(), 0U);
bcwhite 2017/03/06 13:59:17 How about making this a method off of GlobalActivi
manzagop (departed) 2017/03/06 16:46:26 I guess GlobalActivityTracker would have a flush t
bcwhite 2017/03/07 18:37:26 Yeah... It would have to be a virtual method on t
}
}
#endif // defined(OS_WIN)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698