summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-24 22:37:41 +0000
committergspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-24 22:37:41 +0000
commitbef6a76eee8120e1092e7c0baab855ed945a7a88 (patch)
tree72f62aae259fef288b069879e699c9e399d2d8dd
parent4825d8bb3baec6701244908a8a9e0ce1fc4a7c2b (diff)
downloadchromium_src-bef6a76eee8120e1092e7c0baab855ed945a7a88.zip
chromium_src-bef6a76eee8120e1092e7c0baab855ed945a7a88.tar.gz
chromium_src-bef6a76eee8120e1092e7c0baab855ed945a7a88.tar.bz2
Merge 86141 - This adds a Flush to the session backend to help with data corruption at ChromeOS shutdown.
We're seeing crashes due to corrupted history items in the session data on ChromeOS, and this is a bandaid to help reduce them. It's not the real solution, which is to have more corruption-robust history item storage and recovery, but it shouldn't cause any harm. Our supposition here is that corruption is occurring because we shutdown while session data hasn't been flushed to the disk, thus corrupting the history data, which is fragile, and we crash the next time we read in the session. This CL will help because we flush after appending system data. Other CLs will help to clean up the bad history data, and be more robust in the case of corruption. BUG=chromium-os:15478, chromium-os:15350 TEST=Loaded existing current state, exited, reloaded, ran unit test. Review URL: http://codereview.chromium.org/7044018 TBR=zelidrag@google.com Review URL: http://codereview.chromium.org/7063027 git-svn-id: svn://svn.chromium.org/chrome/branches/742/src@86506 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/sessions/session_backend.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/browser/sessions/session_backend.cc b/chrome/browser/sessions/session_backend.cc
index 0cbc55d..15b4b3c 100644
--- a/chrome/browser/sessions/session_backend.cc
+++ b/chrome/browser/sessions/session_backend.cc
@@ -341,6 +341,7 @@ bool SessionBackend::AppendCommandsToFile(net::FileStream* file,
}
}
}
+ file->Flush();
return true;
}