| Index: base/files/file_posix.cc
|
| diff --git a/base/files/file_posix.cc b/base/files/file_posix.cc
|
| index b74fb4b9aa247d55eac20e7c3d68970b2043e8a0..41d6304ac16a492c30ccbfde2e3c960be26c4fa6 100644
|
| --- a/base/files/file_posix.cc
|
| +++ b/base/files/file_posix.cc
|
| @@ -32,12 +32,12 @@ namespace {
|
|
|
| #if defined(OS_BSD) || defined(OS_MACOSX) || defined(OS_NACL)
|
| static int CallFstat(int fd, stat_wrapper_t *sb) {
|
| - base::ThreadRestrictions::AssertIOAllowed();
|
| + ThreadRestrictions::AssertIOAllowed();
|
| return fstat(fd, sb);
|
| }
|
| #else
|
| static int CallFstat(int fd, stat_wrapper_t *sb) {
|
| - base::ThreadRestrictions::AssertIOAllowed();
|
| + ThreadRestrictions::AssertIOAllowed();
|
| return fstat64(fd, sb);
|
| }
|
| #endif
|
| @@ -170,7 +170,7 @@ void UnprotectFileDescriptor(int fd) {
|
| #if !defined(OS_NACL)
|
| // TODO(erikkay): does it make sense to support FLAG_EXCLUSIVE_* here?
|
| void File::InitializeUnsafe(const FilePath& name, uint32 flags) {
|
| - base::ThreadRestrictions::AssertIOAllowed();
|
| + ThreadRestrictions::AssertIOAllowed();
|
| DCHECK(!IsValid());
|
|
|
| int open_flags = 0;
|
| @@ -274,13 +274,13 @@ void File::Close() {
|
| if (!IsValid())
|
| return;
|
|
|
| - base::ThreadRestrictions::AssertIOAllowed();
|
| + ThreadRestrictions::AssertIOAllowed();
|
| UnprotectFileDescriptor(GetPlatformFile());
|
| file_.reset();
|
| }
|
|
|
| int64 File::Seek(Whence whence, int64 offset) {
|
| - base::ThreadRestrictions::AssertIOAllowed();
|
| + ThreadRestrictions::AssertIOAllowed();
|
| DCHECK(IsValid());
|
|
|
| #if defined(OS_ANDROID)
|
| @@ -295,7 +295,7 @@ int64 File::Seek(Whence whence, int64 offset) {
|
| }
|
|
|
| int File::Read(int64 offset, char* data, int size) {
|
| - base::ThreadRestrictions::AssertIOAllowed();
|
| + ThreadRestrictions::AssertIOAllowed();
|
| DCHECK(IsValid());
|
| if (size < 0)
|
| return -1;
|
| @@ -315,7 +315,7 @@ int File::Read(int64 offset, char* data, int size) {
|
| }
|
|
|
| int File::ReadAtCurrentPos(char* data, int size) {
|
| - base::ThreadRestrictions::AssertIOAllowed();
|
| + ThreadRestrictions::AssertIOAllowed();
|
| DCHECK(IsValid());
|
| if (size < 0)
|
| return -1;
|
| @@ -334,14 +334,14 @@ int File::ReadAtCurrentPos(char* data, int size) {
|
| }
|
|
|
| int File::ReadNoBestEffort(int64 offset, char* data, int size) {
|
| - base::ThreadRestrictions::AssertIOAllowed();
|
| + ThreadRestrictions::AssertIOAllowed();
|
| DCHECK(IsValid());
|
|
|
| return HANDLE_EINTR(pread(file_.get(), data, size, offset));
|
| }
|
|
|
| int File::ReadAtCurrentPosNoBestEffort(char* data, int size) {
|
| - base::ThreadRestrictions::AssertIOAllowed();
|
| + ThreadRestrictions::AssertIOAllowed();
|
| DCHECK(IsValid());
|
| if (size < 0)
|
| return -1;
|
| @@ -350,7 +350,7 @@ int File::ReadAtCurrentPosNoBestEffort(char* data, int size) {
|
| }
|
|
|
| int File::Write(int64 offset, const char* data, int size) {
|
| - base::ThreadRestrictions::AssertIOAllowed();
|
| + ThreadRestrictions::AssertIOAllowed();
|
|
|
| if (IsOpenAppend(file_.get()))
|
| return WriteAtCurrentPos(data, size);
|
| @@ -374,7 +374,7 @@ int File::Write(int64 offset, const char* data, int size) {
|
| }
|
|
|
| int File::WriteAtCurrentPos(const char* data, int size) {
|
| - base::ThreadRestrictions::AssertIOAllowed();
|
| + ThreadRestrictions::AssertIOAllowed();
|
| DCHECK(IsValid());
|
| if (size < 0)
|
| return -1;
|
| @@ -394,7 +394,7 @@ int File::WriteAtCurrentPos(const char* data, int size) {
|
| }
|
|
|
| int File::WriteAtCurrentPosNoBestEffort(const char* data, int size) {
|
| - base::ThreadRestrictions::AssertIOAllowed();
|
| + ThreadRestrictions::AssertIOAllowed();
|
| DCHECK(IsValid());
|
| if (size < 0)
|
| return -1;
|
| @@ -413,13 +413,13 @@ int64 File::GetLength() {
|
| }
|
|
|
| bool File::SetLength(int64 length) {
|
| - base::ThreadRestrictions::AssertIOAllowed();
|
| + ThreadRestrictions::AssertIOAllowed();
|
| DCHECK(IsValid());
|
| return !CallFtruncate(file_.get(), length);
|
| }
|
|
|
| bool File::SetTimes(Time last_access_time, Time last_modified_time) {
|
| - base::ThreadRestrictions::AssertIOAllowed();
|
| + ThreadRestrictions::AssertIOAllowed();
|
| DCHECK(IsValid());
|
|
|
| timeval times[2];
|
| @@ -542,7 +542,7 @@ void File::MemoryCheckingScopedFD::UpdateChecksum() {
|
| }
|
|
|
| bool File::DoFlush() {
|
| - base::ThreadRestrictions::AssertIOAllowed();
|
| + ThreadRestrictions::AssertIOAllowed();
|
| DCHECK(IsValid());
|
| #if defined(OS_NACL)
|
| NOTIMPLEMENTED(); // NaCl doesn't implement fsync.
|
|
|