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

Side by Side Diff: WebKit/chromium/src/WebBlobData.cpp

Issue 11192017: ********** WebCore blob hacking (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/Source/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « WebKit/chromium/src/WebBlob.cpp ('k') | WebKit/chromium/src/WebFileSystemCallbacksImpl.h » ('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) 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 bool WebBlobData::itemAt(size_t index, Item& result) const 60 bool WebBlobData::itemAt(size_t index, Item& result) const
61 { 61 {
62 ASSERT(!isNull()); 62 ASSERT(!isNull());
63 63
64 if (index >= m_private->items().size()) 64 if (index >= m_private->items().size())
65 return false; 65 return false;
66 66
67 const BlobDataItem& item = m_private->items()[index]; 67 const BlobDataItem& item = m_private->items()[index];
68 result.data.reset(); 68 result.data.reset();
69 result.filePath.reset(); 69 result.filePath.reset();
70 result.blobURL = KURL(); 70 result.blobUUID.reset();
71 result.offset = item.offset; 71 result.offset = item.offset;
72 result.length = item.length; 72 result.length = item.length;
73 result.expectedModificationTime = item.expectedModificationTime; 73 result.expectedModificationTime = item.expectedModificationTime;
74 74
75 switch (item.type) { 75 switch (item.type) {
76 case BlobDataItem::Data: 76 case BlobDataItem::Data:
77 result.type = Item::TypeData; 77 result.type = Item::TypeData;
78 result.data = item.data; 78 result.data = item.data;
79 return true; 79 return true;
80 case BlobDataItem::File: 80 case BlobDataItem::File:
81 result.type = Item::TypeFile; 81 result.type = Item::TypeFile;
82 result.filePath = item.path; 82 result.filePath = item.path;
83 return true; 83 return true;
84 case BlobDataItem::Blob: 84 case BlobDataItem::Blob:
85 result.type = Item::TypeBlob; 85 result.type = Item::TypeBlob;
86 result.blobURL = item.url; // FIXME: deprecate this. 86 result.blobUUID = item.blobDataHandle->uuid();
87 result.url = item.url;
88 return true; 87 return true;
89 case BlobDataItem::URL: 88 case BlobDataItem::FileSystemURL:
90 result.type = Item::TypeURL; 89 result.type = Item::TypeFileSystemURL;
91 result.url = item.url; 90 result.fileSystemURL = item.fileSystemURL;
92 return true; 91 return true;
93 } 92 }
94 ASSERT_NOT_REACHED(); 93 ASSERT_NOT_REACHED();
95 return false; 94 return false;
96 } 95 }
97 96
98 WebString WebBlobData::contentType() const 97 WebString WebBlobData::contentType() const
99 { 98 {
100 ASSERT(!isNull()); 99 ASSERT(!isNull());
101 return m_private->contentType(); 100 return m_private->contentType();
(...skipping 25 matching lines...) Expand all
127 } 126 }
128 127
129 void WebBlobData::assign(const PassOwnPtr<BlobData>& data) 128 void WebBlobData::assign(const PassOwnPtr<BlobData>& data)
130 { 129 {
131 if (m_private) 130 if (m_private)
132 delete m_private; 131 delete m_private;
133 m_private = static_cast<WebBlobDataPrivate*>(data.leakPtr()); 132 m_private = static_cast<WebBlobDataPrivate*>(data.leakPtr());
134 } 133 }
135 134
136 } // namespace WebKit 135 } // namespace WebKit
OLDNEW
« no previous file with comments | « WebKit/chromium/src/WebBlob.cpp ('k') | WebKit/chromium/src/WebFileSystemCallbacksImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698