summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/sessions/session_backend.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/sessions/session_backend.cc b/chrome/browser/sessions/session_backend.cc
index dfb1200..c06f811 100644
--- a/chrome/browser/sessions/session_backend.cc
+++ b/chrome/browser/sessions/session_backend.cc
@@ -352,7 +352,7 @@ void SessionBackend::ResetFile() {
net::FileStream* SessionBackend::OpenAndWriteHeader(const FilePath& path) {
DCHECK(!path.empty());
- net::FileStream* file = new net::FileStream();
+ scoped_ptr<net::FileStream> file(new net::FileStream());
file->Open(path, base::PLATFORM_FILE_CREATE_ALWAYS |
base::PLATFORM_FILE_WRITE | base::PLATFORM_FILE_EXCLUSIVE_WRITE |
base::PLATFORM_FILE_EXCLUSIVE_READ);
@@ -365,7 +365,7 @@ net::FileStream* SessionBackend::OpenAndWriteHeader(const FilePath& path) {
sizeof(header), NULL);
if (wrote != sizeof_header())
return NULL;
- return file;
+ return file.release();
}
FilePath SessionBackend::GetLastSessionPath() {