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

Unified Diff: content/browser/fileapi/fileapi_message_filter.cc

Issue 10444010: Revert 138554 - Prevent zero-length items from being appended to a blob. (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
« no previous file with comments | « content/browser/fileapi/fileapi_message_filter.h ('k') | content/common/fileapi/webblobregistry_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/fileapi/fileapi_message_filter.cc
===================================================================
--- content/browser/fileapi/fileapi_message_filter.cc (revision 138789)
+++ content/browser/fileapi/fileapi_message_filter.cc (working copy)
@@ -172,11 +172,6 @@
FileAPIMessageFilter::~FileAPIMessageFilter() {}
-void FileAPIMessageFilter::BadMessageReceived() {
- content::RecordAction(UserMetricsAction("BadMessageTerminate_FAMF"));
- BrowserMessageFilter::BadMessageReceived();
-}
-
void FileAPIMessageFilter::OnOpen(
int request_id, const GURL& origin_url, fileapi::FileSystemType type,
int64 requested_size, bool create) {
@@ -468,20 +463,12 @@
OnRemoveBlob(url);
return;
}
- if (item.length == 0) {
- BadMessageReceived();
- return;
- }
blob_storage_context_->controller()->AppendBlobDataItem(url, item);
}
void FileAPIMessageFilter::OnAppendSharedMemory(
const GURL& url, base::SharedMemoryHandle handle, size_t buffer_size) {
DCHECK(base::SharedMemory::IsHandleValid(handle));
- if (!buffer_size) {
- BadMessageReceived();
- return;
- }
#if defined(OS_WIN)
base::SharedMemory shared_memory(handle, true, peer_handle());
#else
@@ -706,4 +693,3 @@
operations_.AddWithID(operation, request_id);
return operation;
}
-
« no previous file with comments | « content/browser/fileapi/fileapi_message_filter.h ('k') | content/common/fileapi/webblobregistry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698