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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp

Issue 1502503004: Remove kuint64max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint8
Patch Set: rebase Created 5 years 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "modules/fetch/FetchBlobDataConsumerHandle.h" 6 #include "modules/fetch/FetchBlobDataConsumerHandle.h"
7 7
8 #include "core/dom/ExecutionContext.h" 8 #include "core/dom/ExecutionContext.h"
9 #include "core/fetch/FetchInitiatorTypeNames.h" 9 #include "core/fetch/FetchInitiatorTypeNames.h"
10 #include "core/loader/ThreadableLoaderClient.h" 10 #include "core/loader/ThreadableLoaderClient.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 Result endRead(size_t readSize) override 211 Result endRead(size_t readSize) override
212 { 212 {
213 return m_reader->endRead(readSize); 213 return m_reader->endRead(readSize);
214 } 214 }
215 215
216 PassRefPtr<BlobDataHandle> drainAsBlobDataHandle(BlobSizePolicy blobSize Policy) override 216 PassRefPtr<BlobDataHandle> drainAsBlobDataHandle(BlobSizePolicy blobSize Policy) override
217 { 217 {
218 if (!m_readerContext->m_blobDataHandleForDrain) 218 if (!m_readerContext->m_blobDataHandleForDrain)
219 return nullptr; 219 return nullptr;
220 if (blobSizePolicy == DisallowBlobWithInvalidSize && m_readerContext ->m_blobDataHandleForDrain->size() == kuint64max) 220 if (blobSizePolicy == DisallowBlobWithInvalidSize && m_readerContext ->m_blobDataHandleForDrain->size() == UINT64_MAX)
221 return nullptr; 221 return nullptr;
222 RefPtr<BlobDataHandle> blobDataHandle = m_readerContext->m_blobDataH andleForDrain; 222 RefPtr<BlobDataHandle> blobDataHandle = m_readerContext->m_blobDataH andleForDrain;
223 m_readerContext->setDrained(); 223 m_readerContext->setDrained();
224 m_readerContext->clearBlobDataHandleForDrain(); 224 m_readerContext->clearBlobDataHandleForDrain();
225 return blobDataHandle.release(); 225 return blobDataHandle.release();
226 } 226 }
227 227
228 PassRefPtr<EncodedFormData> drainAsFormData() override 228 PassRefPtr<EncodedFormData> drainAsFormData() override
229 { 229 {
230 RefPtr<BlobDataHandle> handle = drainAsBlobDataHandle(AllowBlobWithI nvalidSize); 230 RefPtr<BlobDataHandle> handle = drainAsBlobDataHandle(AllowBlobWithI nvalidSize);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 305
306 return adoptPtr(new FetchBlobDataConsumerHandle(executionContext, blobDataHa ndle, new DefaultLoaderFactory)); 306 return adoptPtr(new FetchBlobDataConsumerHandle(executionContext, blobDataHa ndle, new DefaultLoaderFactory));
307 } 307 }
308 308
309 FetchDataConsumerHandle::Reader* FetchBlobDataConsumerHandle::obtainReaderIntern al(Client* client) 309 FetchDataConsumerHandle::Reader* FetchBlobDataConsumerHandle::obtainReaderIntern al(Client* client)
310 { 310 {
311 return m_readerContext->obtainReader(client).leakPtr(); 311 return m_readerContext->obtainReader(client).leakPtr();
312 } 312 }
313 313
314 } // namespace blink 314 } // namespace blink
OLDNEW
« no previous file with comments | « storage/common/data_element.cc ('k') | third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698