| OLD | NEW | 
|   1 // Copyright 2014 The Chromium Authors. All rights reserved. |   1 // Copyright 2014 The Chromium Authors. All rights reserved. | 
|   2 // Use of this source code is governed by a BSD-style license that can be |   2 // Use of this source code is governed by a BSD-style license that can be | 
|   3 // found in the LICENSE file. |   3 // found in the LICENSE file. | 
|   4  |   4  | 
|   5 #include "config.h" |   5 #include "config.h" | 
|   6 #include "RequestInit.h" |   6 #include "RequestInit.h" | 
|   7  |   7  | 
|   8 #include "bindings/core/v8/Dictionary.h" |   8 #include "bindings/core/v8/Dictionary.h" | 
|   9 #include "bindings/core/v8/V8ArrayBuffer.h" |   9 #include "bindings/core/v8/V8ArrayBuffer.h" | 
|  10 #include "bindings/core/v8/V8ArrayBufferView.h" |  10 #include "bindings/core/v8/V8ArrayBufferView.h" | 
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  71                 break; |  71                 break; | 
|  72             case FormDataElement::encodedFileSystemURL: |  72             case FormDataElement::encodedFileSystemURL: | 
|  73                 blobData->appendFileSystemURL(element.m_fileSystemURL, element.m
    _fileStart, element.m_fileLength, element.m_expectedFileModificationTime); |  73                 blobData->appendFileSystemURL(element.m_fileSystemURL, element.m
    _fileStart, element.m_fileLength, element.m_expectedFileModificationTime); | 
|  74                 break; |  74                 break; | 
|  75             default: |  75             default: | 
|  76                 ASSERT_NOT_REACHED(); |  76                 ASSERT_NOT_REACHED(); | 
|  77             } |  77             } | 
|  78         } |  78         } | 
|  79         blobData->setContentType(AtomicString("multipart/form-data; boundary=", 
    AtomicString::ConstructFromLiteral) + httpBody->boundary().data()); |  79         blobData->setContentType(AtomicString("multipart/form-data; boundary=", 
    AtomicString::ConstructFromLiteral) + httpBody->boundary().data()); | 
|  80     } else if (body->IsString()) { |  80     } else if (body->IsString()) { | 
|  81         String stringValue(toScalarValueString(body, exceptionState)); |  81         String stringValue(toUSVString(body, exceptionState)); | 
|  82         blobData->appendText(stringValue, false); |  82         blobData->appendText(stringValue, false); | 
|  83         blobData->setContentType("text/plain;charset=UTF-8"); |  83         blobData->setContentType("text/plain;charset=UTF-8"); | 
|  84     } else { |  84     } else { | 
|  85         return; |  85         return; | 
|  86     } |  86     } | 
|  87     const long long blobSize = blobData->length(); |  87     const long long blobSize = blobData->length(); | 
|  88     bodyBlobHandle = BlobDataHandle::create(blobData.release(), blobSize); |  88     bodyBlobHandle = BlobDataHandle::create(blobData.release(), blobSize); | 
|  89 } |  89 } | 
|  90  |  90  | 
|  91 } |  91 } | 
| OLD | NEW |