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

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

Issue 337343002: IDL: make optional arguments (without default) explicit sometimes Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-default-arguments-next
Patch Set: Created 6 years, 4 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 | « Source/core/fileapi/Blob.cpp ('k') | Source/core/fileapi/File.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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 98
99 static PassRefPtrWillBeRawPtr<File> createForFileSystemFile(const String& pa th, const String& name, ContentTypeLookupPolicy policy = WellKnownContentTypes) 99 static PassRefPtrWillBeRawPtr<File> createForFileSystemFile(const String& pa th, const String& name, ContentTypeLookupPolicy policy = WellKnownContentTypes)
100 { 100 {
101 if (name.isEmpty()) 101 if (name.isEmpty())
102 return adoptRefWillBeNoop(new File(path, policy, File::IsNotUserVisi ble)); 102 return adoptRefWillBeNoop(new File(path, policy, File::IsNotUserVisi ble));
103 return adoptRefWillBeNoop(new File(path, name, policy, File::IsNotUserVi sible)); 103 return adoptRefWillBeNoop(new File(path, name, policy, File::IsNotUserVi sible));
104 } 104 }
105 105
106 virtual unsigned long long size() const OVERRIDE; 106 virtual unsigned long long size() const OVERRIDE;
107 virtual PassRefPtrWillBeRawPtr<Blob> slice(long long start, long long end, c onst String& contentType, ExceptionState&) const OVERRIDE; 107 virtual PassRefPtrWillBeRawPtr<Blob> slice(long long start, Optional<long lo ng> end, const String& contentType, ExceptionState&) const OVERRIDE;
108 virtual void close(ExecutionContext*, ExceptionState&) OVERRIDE; 108 virtual void close(ExecutionContext*, ExceptionState&) OVERRIDE;
109 109
110 virtual bool isFile() const OVERRIDE { return true; } 110 virtual bool isFile() const OVERRIDE { return true; }
111 virtual bool hasBackingFile() const OVERRIDE { return m_hasBackingFile; } 111 virtual bool hasBackingFile() const OVERRIDE { return m_hasBackingFile; }
112 112
113 virtual void appendTo(BlobData&) const OVERRIDE; 113 virtual void appendTo(BlobData&) const OVERRIDE;
114 114
115 const String& path() const { ASSERT(hasValidFilePath()); return m_path; } 115 const String& path() const { ASSERT(hasValidFilePath()); return m_path; }
116 const String name() const { return m_name; } 116 const String name() const { return m_name; }
117 117
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 const double m_snapshotModificationTime; 167 const double m_snapshotModificationTime;
168 168
169 String m_relativePath; 169 String m_relativePath;
170 }; 170 };
171 171
172 DEFINE_TYPE_CASTS(File, Blob, blob, blob->isFile(), blob.isFile()); 172 DEFINE_TYPE_CASTS(File, Blob, blob, blob->isFile(), blob.isFile());
173 173
174 } // namespace blink 174 } // namespace blink
175 175
176 #endif // File_h 176 #endif // File_h
OLDNEW
« no previous file with comments | « Source/core/fileapi/Blob.cpp ('k') | Source/core/fileapi/File.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698