OLD | NEW |
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // BlobURLRegistry (that is implemented by the embedder) on | 75 // BlobURLRegistry (that is implemented by the embedder) on |
76 // multiple threads.) | 76 // multiple threads.) |
77 DEFINE_THREAD_SAFE_STATIC_LOCAL(BlobURLRegistry, instance, | 77 DEFINE_THREAD_SAFE_STATIC_LOCAL(BlobURLRegistry, instance, |
78 new BlobURLRegistry()); | 78 new BlobURLRegistry()); |
79 return instance; | 79 return instance; |
80 } | 80 } |
81 | 81 |
82 } // namespace | 82 } // namespace |
83 | 83 |
84 Blob::Blob(PassRefPtr<BlobDataHandle> dataHandle) | 84 Blob::Blob(PassRefPtr<BlobDataHandle> dataHandle) |
85 : m_blobDataHandle(dataHandle), m_isClosed(false) {} | 85 : m_blobDataHandle(std::move(dataHandle)), m_isClosed(false) {} |
86 | 86 |
87 Blob::~Blob() {} | 87 Blob::~Blob() {} |
88 | 88 |
89 // static | 89 // static |
90 Blob* Blob::create( | 90 Blob* Blob::create( |
91 ExecutionContext* context, | 91 ExecutionContext* context, |
92 const HeapVector<ArrayBufferOrArrayBufferViewOrBlobOrUSVString>& blobParts, | 92 const HeapVector<ArrayBufferOrArrayBufferViewOrBlobOrUSVString>& blobParts, |
93 const BlobPropertyBag& options, | 93 const BlobPropertyBag& options, |
94 ExceptionState& exceptionState) { | 94 ExceptionState& exceptionState) { |
95 ASSERT(options.hasType()); | 95 ASSERT(options.hasType()); |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 const UChar* chars = type.characters16(); | 234 const UChar* chars = type.characters16(); |
235 for (size_t i = 0; i < length; ++i) { | 235 for (size_t i = 0; i < length; ++i) { |
236 if (chars[i] < 0x0020 || chars[i] > 0x007e) | 236 if (chars[i] < 0x0020 || chars[i] > 0x007e) |
237 return emptyString; | 237 return emptyString; |
238 } | 238 } |
239 } | 239 } |
240 return type.lower(); | 240 return type.lower(); |
241 } | 241 } |
242 | 242 |
243 } // namespace blink | 243 } // namespace blink |
OLD | NEW |