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

Unified Diff: content/child/fileapi/webfilewriter_base.cc

Issue 23223003: Chromium Blob hacking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/fileapi/webfilewriter_base.h ('k') | content/child/fileapi/webfilewriter_base_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/fileapi/webfilewriter_base.cc
diff --git a/content/child/fileapi/webfilewriter_base.cc b/content/child/fileapi/webfilewriter_base.cc
index 2d0707a51e23fb0e01efbd87e3cc4ebfd4c60ceb..705f211cc8304beab4f0426f590a9055297fcbdd 100644
--- a/content/child/fileapi/webfilewriter_base.cc
+++ b/content/child/fileapi/webfilewriter_base.cc
@@ -32,10 +32,19 @@ void WebFileWriterBase::truncate(long long length) {
void WebFileWriterBase::write(long long position,
const WebKit::WebURL& blob_url) {
- DCHECK(kOperationNone == operation_);
- DCHECK(kCancelNotInProgress == cancel_state_);
+ DCHECK_EQ(kOperationNone, operation_);
+ DCHECK_EQ(kCancelNotInProgress, cancel_state_);
+ operation_ = kOperationWrite;
+ DoWriteDeprecated(path_, blob_url, position);
+}
+
+void WebFileWriterBase::write(
+ long long position,
+ const WebKit::WebString& id) {
+ DCHECK_EQ(kOperationNone, operation_);
+ DCHECK_EQ(kCancelNotInProgress, cancel_state_);
operation_ = kOperationWrite;
- DoWrite(path_, blob_url, position);
+ DoWrite(path_, id.utf8(), position);
}
// When we cancel a write/truncate, we always get back the result of the write
« no previous file with comments | « content/child/fileapi/webfilewriter_base.h ('k') | content/child/fileapi/webfilewriter_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698