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

Side by Side Diff: Source/core/fileapi/File.cpp

Issue 1118993002: Oilpan: IDL union objects should be put in HeapVector (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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/core/fileapi/File.h ('k') | Source/core/testing/UnionTypesTest.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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 static PassOwnPtr<BlobData> createBlobDataForFileSystemURL(const KURL& fileSyste mURL, const FileMetadata& metadata) 82 static PassOwnPtr<BlobData> createBlobDataForFileSystemURL(const KURL& fileSyste mURL, const FileMetadata& metadata)
83 { 83 {
84 OwnPtr<BlobData> blobData = BlobData::create(); 84 OwnPtr<BlobData> blobData = BlobData::create();
85 blobData->setContentType(getContentTypeFromFileName(fileSystemURL.path(), Fi le::WellKnownContentTypes)); 85 blobData->setContentType(getContentTypeFromFileName(fileSystemURL.path(), Fi le::WellKnownContentTypes));
86 blobData->appendFileSystemURL(fileSystemURL, 0, metadata.length, metadata.mo dificationTime / msPerSecond); 86 blobData->appendFileSystemURL(fileSystemURL, 0, metadata.length, metadata.mo dificationTime / msPerSecond);
87 return blobData.release(); 87 return blobData.release();
88 } 88 }
89 89
90 // static 90 // static
91 File* File::create(const Vector<BlobOrStringOrArrayBufferViewOrArrayBuffer>& fil eBits, const String& fileName, const FilePropertyBag& options, ExceptionState& e xceptionState) 91 File* File::create(const HeapVector<BlobOrStringOrArrayBufferViewOrArrayBuffer>& fileBits, const String& fileName, const FilePropertyBag& options, ExceptionStat e& exceptionState)
92 { 92 {
93 ASSERT(options.hasType()); 93 ASSERT(options.hasType());
94 if (!options.type().containsOnlyASCII()) { 94 if (!options.type().containsOnlyASCII()) {
95 exceptionState.throwDOMException(SyntaxError, "The 'type' property must consist of ASCII characters."); 95 exceptionState.throwDOMException(SyntaxError, "The 'type' property must consist of ASCII characters.");
96 return nullptr; 96 return nullptr;
97 } 97 }
98 98
99 double lastModified; 99 double lastModified;
100 if (options.hasLastModified()) 100 if (options.hasLastModified())
101 lastModified = static_cast<double>(options.lastModified()); 101 lastModified = static_cast<double>(options.lastModified());
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 if (m_fileSystemURL.isEmpty() != other.m_fileSystemURL.isEmpty()) 355 if (m_fileSystemURL.isEmpty() != other.m_fileSystemURL.isEmpty())
356 return false; 356 return false;
357 357
358 if (!m_fileSystemURL.isEmpty()) 358 if (!m_fileSystemURL.isEmpty())
359 return m_fileSystemURL == other.m_fileSystemURL; 359 return m_fileSystemURL == other.m_fileSystemURL;
360 360
361 return uuid() == other.uuid(); 361 return uuid() == other.uuid();
362 } 362 }
363 363
364 } // namespace blink 364 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/fileapi/File.h ('k') | Source/core/testing/UnionTypesTest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698