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

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

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 5 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/fetch/FontResource.cpp ('k') | Source/core/frame/FrameView.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) 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 private: 119 private:
120 File(const String& path, ContentTypeLookupPolicy); 120 File(const String& path, ContentTypeLookupPolicy);
121 File(const String& path, const String& name, ContentTypeLookupPolicy); 121 File(const String& path, const String& name, ContentTypeLookupPolicy);
122 File(const String& path, const String& name, const String& relativePath, boo l hasSnaphotData, uint64_t size, double lastModified, PassRefPtr<BlobDataHandle> ); 122 File(const String& path, const String& name, const String& relativePath, boo l hasSnaphotData, uint64_t size, double lastModified, PassRefPtr<BlobDataHandle> );
123 File(const String& name, double modificationTime, PassRefPtr<BlobDataHandle> ); 123 File(const String& name, double modificationTime, PassRefPtr<BlobDataHandle> );
124 File(const String& name, const FileMetadata&); 124 File(const String& name, const FileMetadata&);
125 File(const KURL& fileSystemURL, const FileMetadata&); 125 File(const KURL& fileSystemURL, const FileMetadata&);
126 126
127 void invalidateSnapshotMetadata() { m_snapshotSize = -1; } 127 void invalidateSnapshotMetadata() { m_snapshotSize = -1; }
128 128
129 #ifndef NDEBUG 129 #if ENABLE(ASSERT)
130 bool hasValidFileSystemURL() const { return hasBackingFile(); } 130 bool hasValidFileSystemURL() const { return hasBackingFile(); }
131 // Instances not backed by a file must have an empty path set. 131 // Instances not backed by a file must have an empty path set.
132 bool hasValidFilePath() const { return hasBackingFile() || m_path.isEmpty(); } 132 bool hasValidFilePath() const { return hasBackingFile() || m_path.isEmpty(); }
133 #endif 133 #endif
134 134
135 bool m_hasBackingFile; 135 bool m_hasBackingFile;
136 String m_path; 136 String m_path;
137 String m_name; 137 String m_name;
138 138
139 KURL m_fileSystemURL; 139 KURL m_fileSystemURL;
140 140
141 // If m_snapshotSize is negative (initialized to -1 by default), the snapsho t metadata is invalid and we retrieve the latest metadata synchronously in size( ), lastModifiedTime() and slice(). 141 // If m_snapshotSize is negative (initialized to -1 by default), the snapsho t metadata is invalid and we retrieve the latest metadata synchronously in size( ), lastModifiedTime() and slice().
142 // Otherwise, the snapshot metadata are used directly in those methods. 142 // Otherwise, the snapshot metadata are used directly in those methods.
143 long long m_snapshotSize; 143 long long m_snapshotSize;
144 const double m_snapshotModificationTime; 144 const double m_snapshotModificationTime;
145 145
146 String m_relativePath; 146 String m_relativePath;
147 }; 147 };
148 148
149 DEFINE_TYPE_CASTS(File, Blob, blob, blob->isFile(), blob.isFile()); 149 DEFINE_TYPE_CASTS(File, Blob, blob, blob->isFile(), blob.isFile());
150 150
151 } // namespace WebCore 151 } // namespace WebCore
152 152
153 #endif // File_h 153 #endif // File_h
OLDNEW
« no previous file with comments | « Source/core/fetch/FontResource.cpp ('k') | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698