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

Unified Diff: content/child/webfileutilities_impl.cc

Issue 207503002: Remove PlatformFile from WebFileUtilitiesImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove methods Created 6 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 | « content/child/webfileutilities_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/webfileutilities_impl.cc
diff --git a/content/child/webfileutilities_impl.cc b/content/child/webfileutilities_impl.cc
index 9c055966fd691a43eb09f70246ff75dbcf0d02c0..5188e515fb41a73c82dbd76c8f9501a250283bf3 100644
--- a/content/child/webfileutilities_impl.cc
+++ b/content/child/webfileutilities_impl.cc
@@ -31,7 +31,6 @@ bool WebFileUtilitiesImpl::getFileInfo(const WebString& path,
NOTREACHED();
return false;
}
- // TODO(rvargas): convert this code to use base::File::Info.
base::File::Info file_info;
if (!base::GetFileInfo(base::FilePath::FromUTF16Unsafe(path),
reinterpret_cast<base::File::Info*>(&file_info)))
@@ -54,34 +53,4 @@ blink::WebURL WebFileUtilitiesImpl::filePathToURL(const WebString& path) {
return net::FilePathToFileURL(base::FilePath::FromUTF16Unsafe(path));
}
-base::PlatformFile WebFileUtilitiesImpl::openFile(const WebString& path,
- int mode) {
- if (sandbox_enabled_) {
- NOTREACHED();
- return base::kInvalidPlatformFileValue;
- }
- // mode==0 (read-only) is the only supported mode.
- // TODO(kinuko): Remove this parameter.
- DCHECK_EQ(0, mode);
- return base::CreatePlatformFile(
- base::FilePath::FromUTF16Unsafe(path),
- base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ,
- NULL, NULL);
-}
-
-void WebFileUtilitiesImpl::closeFile(base::PlatformFile& handle) {
- if (handle == base::kInvalidPlatformFileValue)
- return;
- if (base::ClosePlatformFile(handle))
- handle = base::kInvalidPlatformFileValue;
-}
-
-int WebFileUtilitiesImpl::readFromFile(base::PlatformFile handle,
- char* data,
- int length) {
- if (handle == base::kInvalidPlatformFileValue || !data || length <= 0)
- return -1;
- return base::ReadPlatformFileCurPosNoBestEffort(handle, data, length);
-}
-
} // namespace content
« no previous file with comments | « content/child/webfileutilities_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698