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

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

Issue 9349005: net: Rename FileStream::Open/Close with OpenSync/CloseSync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 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 | « chrome/browser/safe_browsing/bloom_filter.cc ('k') | chrome/browser/themes/browser_theme_pack.cc » ('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 ba9f9ad3ccb7ca1a7cc44ae15e43bb66d5114252..419678efd6bac92b722dc0ed53567b011a66863f 100644
--- a/chrome/browser/sessions/session_backend.cc
+++ b/chrome/browser/sessions/session_backend.cc
@@ -48,7 +48,8 @@ class SessionFileReader {
available_count_(0) {
file_.reset(new net::FileStream(NULL));
if (file_util::PathExists(path))
- file_->Open(path, base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ);
+ file_->OpenSync(path,
+ base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ);
}
// Reads the contents of the file specified in the constructor, returning
// true on success. It is up to the caller to free all SessionCommands
@@ -347,7 +348,7 @@ SessionBackend::~SessionBackend() {
if (current_session_file_.get()) {
// Close() performs file IO. crbug.com/112512.
base::ThreadRestrictions::ScopedAllowIO allow_io;
- current_session_file_->Close();
+ current_session_file_->CloseSync();
}
}
@@ -370,7 +371,7 @@ void SessionBackend::ResetFile() {
net::FileStream* SessionBackend::OpenAndWriteHeader(const FilePath& path) {
DCHECK(!path.empty());
scoped_ptr<net::FileStream> file(new net::FileStream(NULL));
- if (file->Open(path, base::PLATFORM_FILE_CREATE_ALWAYS |
+ if (file->OpenSync(path, base::PLATFORM_FILE_CREATE_ALWAYS |
base::PLATFORM_FILE_WRITE | base::PLATFORM_FILE_EXCLUSIVE_WRITE |
base::PLATFORM_FILE_EXCLUSIVE_READ) != net::OK)
return NULL;
« no previous file with comments | « chrome/browser/safe_browsing/bloom_filter.cc ('k') | chrome/browser/themes/browser_theme_pack.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698