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

Side by Side Diff: Source/modules/filesystem/FileWriterSync.cpp

Issue 23992003: blob hacking webcore style (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 void FileWriterSync::write(Blob* data, ExceptionState& es) 45 void FileWriterSync::write(Blob* data, ExceptionState& es)
46 { 46 {
47 ASSERT(writer()); 47 ASSERT(writer());
48 ASSERT(m_complete); 48 ASSERT(m_complete);
49 if (!data) { 49 if (!data) {
50 es.throwDOMException(TypeMismatchError, ExceptionMessages::failedToExecu te("write", "FileReaderSync", FileError::typeMismatchErrorMessage)); 50 es.throwDOMException(TypeMismatchError, ExceptionMessages::failedToExecu te("write", "FileReaderSync", FileError::typeMismatchErrorMessage));
51 return; 51 return;
52 } 52 }
53 53
54 prepareForWrite(); 54 prepareForWrite();
55 writer()->write(position(), WebKit::WebURL(data->url())); 55 writer()->write(position(), data->uuid());
56 ASSERT(m_complete); 56 ASSERT(m_complete);
57 if (m_error) { 57 if (m_error) {
58 FileError::throwDOMException(es, m_error); 58 FileError::throwDOMException(es, m_error);
59 return; 59 return;
60 } 60 }
61 setPosition(position() + data->size()); 61 setPosition(position() + data->size());
62 if (position() > length()) 62 if (position() > length())
63 setLength(position()); 63 setLength(position());
64 } 64 }
65 65
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 m_complete = false; 137 m_complete = false;
138 #endif 138 #endif
139 } 139 }
140 140
141 FileWriterSync::~FileWriterSync() 141 FileWriterSync::~FileWriterSync()
142 { 142 {
143 } 143 }
144 144
145 145
146 } // namespace WebCore 146 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/filesystem/FileWriter.cpp ('k') | Source/modules/imagebitmap/ImageBitmapFactories.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698