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

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

Issue 10827414: Factor out common Element struct from BlobData and ResourceRequestBody (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: webkit/common -> webkit/base Created 8 years, 4 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/fileapi/fileapi_message_filter.cc
diff --git a/content/browser/fileapi/fileapi_message_filter.cc b/content/browser/fileapi/fileapi_message_filter.cc
index da6581b5d4d5a24abe3222a91f9a8374afa1a445..9c54499c0fd825c2ebcd33864dd8c1292fc28b20 100644
--- a/content/browser/fileapi/fileapi_message_filter.cc
+++ b/content/browser/fileapi/fileapi_message_filter.cc
@@ -523,13 +523,13 @@ void FileAPIMessageFilter::OnStartBuildingBlob(const GURL& url) {
void FileAPIMessageFilter::OnAppendBlobDataItem(
const GURL& url, const BlobData::Item& item) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- if (item.type == BlobData::TYPE_FILE &&
+ if (item.type() == BlobData::Item::TYPE_FILE &&
!ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(
- process_id_, item.file_path)) {
+ process_id_, item.path())) {
OnRemoveBlob(url);
return;
}
- if (item.length == 0) {
+ if (item.length() == 0) {
BadMessageReceived();
return;
}
@@ -554,7 +554,7 @@ void FileAPIMessageFilter::OnAppendSharedMemory(
}
BlobData::Item item;
- item.SetToDataExternal(static_cast<char*>(shared_memory.memory()),
+ item.SetToSharedBytes(static_cast<char*>(shared_memory.memory()),
buffer_size);
blob_storage_context_->controller()->AppendBlobDataItem(url, item);
}
@@ -726,7 +726,7 @@ void FileAPIMessageFilter::RegisterFileAsBlob(const GURL& blob_url,
std::string mime_type;
net::GetWellKnownMimeTypeFromExtension(extension, &mime_type);
BlobData::Item item;
- item.SetToFile(platform_path, 0, -1, base::Time());
+ item.SetToFilePathRange(platform_path, 0, -1, base::Time());
BlobStorageController* controller = blob_storage_context_->controller();
controller->StartBuildingBlob(blob_url);
controller->AppendBlobDataItem(blob_url, item);
« no previous file with comments | « chrome/chrome_browser_extensions.gypi ('k') | content/browser/renderer_host/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698