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

Side by Side Diff: Source/platform/network/FormData.h

Issue 29123004: Move core/platform/network to platform/network (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: One more file 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/exported/WebURLResponsePrivate.h ('k') | Source/platform/network/FormData.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2008, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 17 matching lines...) Expand all
28 #include "wtf/text/WTFString.h" 28 #include "wtf/text/WTFString.h"
29 29
30 namespace WTF{ 30 namespace WTF{
31 class TextEncoding; 31 class TextEncoding;
32 } 32 }
33 33
34 namespace WebCore { 34 namespace WebCore {
35 35
36 class BlobDataHandle; 36 class BlobDataHandle;
37 37
38 class FormDataElement { 38 class PLATFORM_EXPORT FormDataElement {
39 public: 39 public:
40 FormDataElement() : m_type(data) { } 40 FormDataElement() : m_type(data) { }
41 explicit FormDataElement(const Vector<char>& array) : m_type(data), m_data(a rray) { } 41 explicit FormDataElement(const Vector<char>& array) : m_type(data), m_data(a rray) { }
42 42
43 FormDataElement(const String& filename, long long fileStart, long long fileL ength, double expectedFileModificationTime) : m_type(encodedFile), m_filename(fi lename), m_fileStart(fileStart), m_fileLength(fileLength), m_expectedFileModific ationTime(expectedFileModificationTime) { } 43 FormDataElement(const String& filename, long long fileStart, long long fileL ength, double expectedFileModificationTime) : m_type(encodedFile), m_filename(fi lename), m_fileStart(fileStart), m_fileLength(fileLength), m_expectedFileModific ationTime(expectedFileModificationTime) { }
44 explicit FormDataElement(const String& blobUUID, PassRefPtr<BlobDataHandle> optionalHandle) : m_type(encodedBlob), m_blobUUID(blobUUID), m_optionalBlobDataH andle(optionalHandle) { } 44 explicit FormDataElement(const String& blobUUID, PassRefPtr<BlobDataHandle> optionalHandle) : m_type(encodedBlob), m_blobUUID(blobUUID), m_optionalBlobDataH andle(optionalHandle) { }
45 FormDataElement(const KURL& fileSystemURL, long long start, long long length , double expectedFileModificationTime) : m_type(encodedFileSystemURL), m_fileSys temURL(fileSystemURL), m_fileStart(start), m_fileLength(length), m_expectedFileM odificationTime(expectedFileModificationTime) { } 45 FormDataElement(const KURL& fileSystemURL, long long start, long long length , double expectedFileModificationTime) : m_type(encodedFileSystemURL), m_fileSys temURL(fileSystemURL), m_fileStart(start), m_fileLength(length), m_expectedFileM odificationTime(expectedFileModificationTime) { }
46 46
47 enum Type { 47 enum Type {
48 data, 48 data,
(...skipping 28 matching lines...) Expand all
77 return a.m_fileSystemURL == b.m_fileSystemURL; 77 return a.m_fileSystemURL == b.m_fileSystemURL;
78 78
79 return true; 79 return true;
80 } 80 }
81 81
82 inline bool operator!=(const FormDataElement& a, const FormDataElement& b) 82 inline bool operator!=(const FormDataElement& a, const FormDataElement& b)
83 { 83 {
84 return !(a == b); 84 return !(a == b);
85 } 85 }
86 86
87 class FormData : public RefCounted<FormData> { 87 class PLATFORM_EXPORT FormData : public RefCounted<FormData> {
88 public: 88 public:
89 enum EncodingType { 89 enum EncodingType {
90 FormURLEncoded, // for application/x-www-form-urlencoded 90 FormURLEncoded, // for application/x-www-form-urlencoded
91 TextPlain, // for text/plain 91 TextPlain, // for text/plain
92 MultipartFormData // for multipart/form-data 92 MultipartFormData // for multipart/form-data
93 }; 93 };
94 94
95 static PassRefPtr<FormData> create(); 95 static PassRefPtr<FormData> create();
96 static PassRefPtr<FormData> create(const void*, size_t); 96 static PassRefPtr<FormData> create(const void*, size_t);
97 static PassRefPtr<FormData> create(const CString&); 97 static PassRefPtr<FormData> create(const CString&);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 154 }
155 155
156 inline bool operator!=(const FormData& a, const FormData& b) 156 inline bool operator!=(const FormData& a, const FormData& b)
157 { 157 {
158 return !(a == b); 158 return !(a == b);
159 } 159 }
160 160
161 } // namespace WebCore 161 } // namespace WebCore
162 162
163 #endif 163 #endif
OLDNEW
« no previous file with comments | « Source/platform/exported/WebURLResponsePrivate.h ('k') | Source/platform/network/FormData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698