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

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

Issue 2640163004: Replace ENABLE(ASSERT) with DCHECK_IS_ON(). (Closed)
Patch Set: Created 3 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
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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 File(const String& name, const FileMetadata&, UserVisibility); 209 File(const String& name, const FileMetadata&, UserVisibility);
210 File(const KURL& fileSystemURL, const FileMetadata&, UserVisibility); 210 File(const KURL& fileSystemURL, const FileMetadata&, UserVisibility);
211 File(const File&); 211 File(const File&);
212 212
213 void invalidateSnapshotMetadata() { m_snapshotSize = -1; } 213 void invalidateSnapshotMetadata() { m_snapshotSize = -1; }
214 214
215 // Returns File's last modified time (in MS since Epoch.) 215 // Returns File's last modified time (in MS since Epoch.)
216 // If the modification time isn't known, the current time is returned. 216 // If the modification time isn't known, the current time is returned.
217 double lastModifiedMS() const; 217 double lastModifiedMS() const;
218 218
219 #if ENABLE(ASSERT) 219 #if DCHECK_IS_ON()
220 // Instances backed by a file must have an empty file system URL. 220 // Instances backed by a file must have an empty file system URL.
221 bool hasValidFileSystemURL() const { 221 bool hasValidFileSystemURL() const {
222 return !hasBackingFile() || m_fileSystemURL.isEmpty(); 222 return !hasBackingFile() || m_fileSystemURL.isEmpty();
223 } 223 }
224 // Instances not backed by a file must have an empty path set. 224 // Instances not backed by a file must have an empty path set.
225 bool hasValidFilePath() const { return hasBackingFile() || m_path.isEmpty(); } 225 bool hasValidFilePath() const { return hasBackingFile() || m_path.isEmpty(); }
226 #endif 226 #endif
227 227
228 bool m_hasBackingFile; 228 bool m_hasBackingFile;
229 UserVisibility m_userVisibility; 229 UserVisibility m_userVisibility;
(...skipping 10 matching lines...) Expand all
240 const double m_snapshotModificationTimeMS; 240 const double m_snapshotModificationTimeMS;
241 241
242 String m_relativePath; 242 String m_relativePath;
243 }; 243 };
244 244
245 DEFINE_TYPE_CASTS(File, Blob, blob, blob->isFile(), blob.isFile()); 245 DEFINE_TYPE_CASTS(File, Blob, blob, blob->isFile(), blob.isFile());
246 246
247 } // namespace blink 247 } // namespace blink
248 248
249 #endif // File_h 249 #endif // File_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698