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

Side by Side Diff: Source/core/fileapi/BlobBuilder.h

Issue 57483002: Implement File constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed feedback on tests. Created 7 years, 1 month 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 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef BlobBuilder_h 31 #ifndef BlobBuilder_h
32 #define BlobBuilder_h 32 #define BlobBuilder_h
33 33
34 #include "platform/blob/BlobData.h" 34 #include "platform/blob/BlobData.h"
35 #include "wtf/Forward.h" 35 #include "wtf/Forward.h"
36 36
37 namespace WTF{
38 class TextEncoding;
39 }
40
41 namespace WebCore { 37 namespace WebCore {
42 38
43 class Blob; 39 class Blob;
44 40 class File;
45 typedef int ExceptionCode;
46 41
47 class BlobBuilder { 42 class BlobBuilder {
48 public: 43 public:
49 BlobBuilder(); 44 BlobBuilder();
50 45
51 void append(Blob*); 46 void append(Blob*);
52 void append(const String& text, const String& ending); 47 void append(const String& text, const String& ending);
53 void append(ArrayBuffer*); 48 void append(ArrayBuffer*);
54 void append(ArrayBufferView*); 49 void append(ArrayBufferView*);
55 50
56 PassRefPtr<Blob> getBlob(const String& contentType); 51 PassRefPtr<Blob> getBlob(const String& contentType);
52 PassRefPtr<File> getFile(const String& contentType, const String& fileName, double modificationTime);
Inactive 2013/11/05 00:38:48 I agree with esprehn that getBlob() / getFile() is
pwnall-personal 2013/11/05 01:14:23 Done. I renamed get{Blob, File} to create{Blob, Fi
kinuko 2013/11/05 11:20:28 Right, there's no reason to keep this class any mo
57 53
58 private: 54 private:
59 void appendBytesData(const void*, size_t); 55 void appendBytesData(const void*, size_t);
60 56
61 Vector<char>& getBuffer(); 57 Vector<char>& getBuffer();
62 58
63 long long m_size; 59 long long m_size;
64 BlobDataItemList m_items; 60 BlobDataItemList m_items;
65 }; 61 };
66 62
67 } // namespace WebCore 63 } // namespace WebCore
68 64
69 #endif // BlobBuilder_h 65 #endif // BlobBuilder_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698