Chromium Code Reviews| Index: Source/bindings/v8/custom/V8BlobCustomHelpers.h |
| diff --git a/Source/bindings/v8/custom/V8BlobCustomHelpers.h b/Source/bindings/v8/custom/V8BlobCustomHelpers.h |
| index 8bb22f0dac3b41646943a1244aba78b405b509df..3495edb4cfb3a72c11f07f0ce5741320f760b68e 100644 |
| --- a/Source/bindings/v8/custom/V8BlobCustomHelpers.h |
| +++ b/Source/bindings/v8/custom/V8BlobCustomHelpers.h |
| @@ -40,12 +40,35 @@ class BlobBuilder; |
| // Shared code between the custom constructor bindings for Blob and File. |
| namespace V8BlobCustomHelpers { |
| +// Parsed properties from a BlobPropertyBag or a FilePropertyBag. |
| +struct ParsedProperties { |
|
haraken
2013/11/18 10:27:48
We normally use class instead of struct for this k
pwnall-personal
2013/11/18 11:23:45
Done.
I also turned the function that took a Pars
|
| + String contentType; |
| + String endings; |
| + |
| + // False if this contains the properties of a BlobPropertyBag. |
| + bool hasFileProperties; |
| + |
| +private: |
| + double m_lastModifiedDate; |
| +#ifndef NDEBUG |
| + bool m_hasLastModifiedDate; |
| +#endif // NDEBUG |
| + |
| + |
| +public: |
| + void setLastModifiedDate(double); |
| + void setDefaultLastModifiedDate(); |
| + double lastModifiedDate(); |
| + |
| + ParsedProperties(bool hasFileProperties); |
|
haraken
2013/11/18 10:27:48
Add 'explicit'.
pwnall-personal
2013/11/18 11:23:45
Done.
Thank you!
|
| +}; |
| + |
| // Extracts the "type" and "endings" properties out of the BlobPropertyBag passed to a Blob constructor. |
| // http://www.w3.org/TR/FileAPI/#constructorParams |
| // Returns true if everything went well, false if a JS exception was thrown. |
| -bool processBlobPropertyBag(v8::Local<v8::Value> propertyBag, const char* blobClassName, String& contentType, String& endings, v8::Isolate*); |
| +bool processBlobPropertyBag(v8::Local<v8::Value> propertyBag, const char* blobClassName, ParsedProperties&, v8::Isolate*); |
| -// Appends the blobParts passed to a Blob constructor into a BlobBuilder. |
| +// Appends the blobParts passed to a Blob or File constructor into a BlobBuilder. |
| // http://www.w3.org/TR/FileAPI/#constructorParams |
| // Returns true if everything went well, false if a JS exception was thrown. |
| bool processBlobParts(v8::Local<v8::Object> blobParts, uint32_t blobPartsLength, const String& endings, BlobBuilder&, v8::Isolate*); |