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

Unified Diff: content/browser/renderer_host/file_utilities_message_filter.cc

Issue 10453037: Deprecate FileUtilities::getFileSize and getFileModifiedTime (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
Index: content/browser/renderer_host/file_utilities_message_filter.cc
diff --git a/content/browser/renderer_host/file_utilities_message_filter.cc b/content/browser/renderer_host/file_utilities_message_filter.cc
index 0f8370aca6021d88304d56da2bdf24664b9ce129..287e18bf3ca00651c03a6017d11ad5f7d8c955e4 100644
--- a/content/browser/renderer_host/file_utilities_message_filter.cc
+++ b/content/browser/renderer_host/file_utilities_message_filter.cc
@@ -28,9 +28,6 @@ bool FileUtilitiesMessageFilter::OnMessageReceived(const IPC::Message& message,
bool* message_was_ok) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP_EX(FileUtilitiesMessageFilter, message, *message_was_ok)
- IPC_MESSAGE_HANDLER(FileUtilitiesMsg_GetFileSize, OnGetFileSize)
- IPC_MESSAGE_HANDLER(FileUtilitiesMsg_GetFileModificationTime,
- OnGetFileModificationTime)
IPC_MESSAGE_HANDLER(FileUtilitiesMsg_GetFileInfo, OnGetFileInfo)
IPC_MESSAGE_HANDLER(FileUtilitiesMsg_OpenFile, OnOpenFile)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -38,40 +35,6 @@ bool FileUtilitiesMessageFilter::OnMessageReceived(const IPC::Message& message,
return handled;
}
-void FileUtilitiesMessageFilter::OnGetFileSize(const FilePath& path,
- int64* result) {
- *result = -1;
-
- // Get file size only when the child process has been granted permission to
- // upload the file.
- if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(
- process_id_, path)) {
- return;
- }
-
- base::PlatformFileInfo file_info;
- file_info.size = 0;
- if (file_util::GetFileInfo(path, &file_info))
- *result = file_info.size;
-}
-
-void FileUtilitiesMessageFilter::OnGetFileModificationTime(
- const FilePath& path, base::Time* result) {
- *result = base::Time();
-
- // Get file modification time only when the child process has been granted
- // permission to upload the file.
- if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(
- process_id_, path)) {
- return;
- }
-
- base::PlatformFileInfo file_info;
- file_info.size = 0;
- if (file_util::GetFileInfo(path, &file_info))
- *result = file_info.last_modified;
-}
-
void FileUtilitiesMessageFilter::OnGetFileInfo(
const FilePath& path,
base::PlatformFileInfo* result,
« no previous file with comments | « content/browser/renderer_host/file_utilities_message_filter.h ('k') | content/common/file_utilities_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698