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

Unified Diff: base/files/file_win.cc

Issue 1101093002: Remove some needless base:: from base::File. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « base/files/file_posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_win.cc
diff --git a/base/files/file_win.cc b/base/files/file_win.cc
index 08d66125cf36a4942d2fcd431f167f72639feaf1..85f17e4e65386612bde37bb4c37714215559d230 100644
--- a/base/files/file_win.cc
+++ b/base/files/file_win.cc
@@ -19,7 +19,7 @@ COMPILE_ASSERT(File::FROM_BEGIN == FILE_BEGIN &&
File::FROM_END == FILE_END, whence_matches_system);
void File::InitializeUnsafe(const FilePath& name, uint32 flags) {
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
DCHECK(!IsValid());
DWORD disposition = 0;
@@ -116,13 +116,13 @@ PlatformFile File::TakePlatformFile() {
void File::Close() {
if (file_.IsValid()) {
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
file_.Close();
}
}
int64 File::Seek(Whence whence, int64 offset) {
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
DCHECK(IsValid());
LARGE_INTEGER distance, res;
@@ -134,7 +134,7 @@ int64 File::Seek(Whence whence, int64 offset) {
}
int File::Read(int64 offset, char* data, int size) {
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
DCHECK(IsValid());
DCHECK(!async_);
if (size < 0)
@@ -157,7 +157,7 @@ int File::Read(int64 offset, char* data, int size) {
}
int File::ReadAtCurrentPos(char* data, int size) {
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
DCHECK(IsValid());
DCHECK(!async_);
if (size < 0)
@@ -181,7 +181,7 @@ int File::ReadAtCurrentPosNoBestEffort(char* data, int size) {
}
int File::Write(int64 offset, const char* data, int size) {
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
DCHECK(IsValid());
DCHECK(!async_);
@@ -200,7 +200,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());
DCHECK(!async_);
if (size < 0)
@@ -218,7 +218,7 @@ int File::WriteAtCurrentPosNoBestEffort(const char* data, int size) {
}
int64 File::GetLength() {
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
DCHECK(IsValid());
LARGE_INTEGER size;
if (!::GetFileSizeEx(file_.Get(), &size))
@@ -228,7 +228,7 @@ int64 File::GetLength() {
}
bool File::SetLength(int64 length) {
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
DCHECK(IsValid());
// Get the current file pointer.
@@ -257,7 +257,7 @@ bool File::SetLength(int64 length) {
}
bool File::SetTimes(Time last_access_time, Time last_modified_time) {
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
DCHECK(IsValid());
FILETIME last_access_filetime = last_access_time.ToFileTime();
@@ -267,7 +267,7 @@ bool File::SetTimes(Time last_access_time, Time last_modified_time) {
}
bool File::GetInfo(Info* info) {
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
DCHECK(IsValid());
BY_HANDLE_FILE_INFORMATION file_info;
@@ -281,13 +281,13 @@ bool File::GetInfo(Info* info) {
info->is_directory =
(file_info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
info->is_symbolic_link = false; // Windows doesn't have symbolic links.
- info->last_modified = base::Time::FromFileTime(file_info.ftLastWriteTime);
- info->last_accessed = base::Time::FromFileTime(file_info.ftLastAccessTime);
- info->creation_time = base::Time::FromFileTime(file_info.ftCreationTime);
+ info->last_modified = Time::FromFileTime(file_info.ftLastWriteTime);
+ info->last_accessed = Time::FromFileTime(file_info.ftLastAccessTime);
+ info->creation_time = Time::FromFileTime(file_info.ftCreationTime);
return true;
}
-File::Error base::File::Lock() {
+File::Error File::Lock() {
DCHECK(IsValid());
BOOL result = LockFile(file_.Get(), 0, 0, MAXDWORD, MAXDWORD);
if (!result)
@@ -363,7 +363,7 @@ File::Error File::OSErrorToFileError(DWORD last_error) {
}
bool File::DoFlush() {
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
DCHECK(IsValid());
return ::FlushFileBuffers(file_.Get()) != FALSE;
}
« no previous file with comments | « base/files/file_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698