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

Unified Diff: chrome/browser/sessions/session_backend.cc

Issue 6674006: Coverity Fixlets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: check against OK. Created 9 years, 9 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 | chrome/renderer/net/predictor_queue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_backend.cc
diff --git a/chrome/browser/sessions/session_backend.cc b/chrome/browser/sessions/session_backend.cc
index 314e427a564bc537a6908cb27e52e70a72d29651..16436ecc0cfcf407649bc740d29a2bc917f60dac 100644
--- a/chrome/browser/sessions/session_backend.cc
+++ b/chrome/browser/sessions/session_backend.cc
@@ -10,6 +10,7 @@
#include "base/metrics/histogram.h"
#include "base/scoped_vector.h"
#include "net/base/file_stream.h"
+#include "net/base/net_errors.h"
using base::TimeTicks;
@@ -365,10 +366,9 @@ void SessionBackend::ResetFile() {
net::FileStream* SessionBackend::OpenAndWriteHeader(const FilePath& path) {
DCHECK(!path.empty());
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);
- if (!file->IsOpen())
+ if(file->Open(path, base::PLATFORM_FILE_CREATE_ALWAYS |
Lei Zhang 2011/03/11 01:45:11 nit: "if(" -> "if ("
Sheridan Rawlins 2011/03/11 01:49:59 Done.
+ base::PLATFORM_FILE_WRITE | base::PLATFORM_FILE_EXCLUSIVE_WRITE |
+ base::PLATFORM_FILE_EXCLUSIVE_READ) != net::OK)
return NULL;
FileHeader header;
header.signature = kFileSignature;
« no previous file with comments | « no previous file | chrome/renderer/net/predictor_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698