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

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

Issue 1305463002: Returning const by ref instead of const by value in File::name() api (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 unsigned long long size() const override; 115 unsigned long long size() const override;
116 Blob* slice(long long start, long long end, const String& contentType, Excep tionState&) const override; 116 Blob* slice(long long start, long long end, const String& contentType, Excep tionState&) const override;
117 void close(ExecutionContext*, ExceptionState&) override; 117 void close(ExecutionContext*, ExceptionState&) override;
118 118
119 bool isFile() const override { return true; } 119 bool isFile() const override { return true; }
120 bool hasBackingFile() const override { return m_hasBackingFile; } 120 bool hasBackingFile() const override { return m_hasBackingFile; }
121 121
122 void appendTo(BlobData&) const override; 122 void appendTo(BlobData&) const override;
123 123
124 const String& path() const { ASSERT(hasValidFilePath()); return m_path; } 124 const String& path() const { ASSERT(hasValidFilePath()); return m_path; }
125 const String name() const { return m_name; } 125 const String& name() const { return m_name; }
126 126
127 // Getter for the lastModified IDL attribute, 127 // Getter for the lastModified IDL attribute,
128 // http://dev.w3.org/2006/webapi/FileAPI/#file-attrs 128 // http://dev.w3.org/2006/webapi/FileAPI/#file-attrs
129 long long lastModified() const; 129 long long lastModified() const;
130 130
131 // Getter for the lastModifiedDate IDL attribute, 131 // Getter for the lastModifiedDate IDL attribute,
132 // http://www.w3.org/TR/FileAPI/#dfn-lastModifiedDate 132 // http://www.w3.org/TR/FileAPI/#dfn-lastModifiedDate
133 double lastModifiedDate() const; 133 double lastModifiedDate() const;
134 134
135 UserVisibility userVisibility() const { return m_userVisibility; } 135 UserVisibility userVisibility() const { return m_userVisibility; }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 const double m_snapshotModificationTimeMS; 181 const double m_snapshotModificationTimeMS;
182 182
183 String m_relativePath; 183 String m_relativePath;
184 }; 184 };
185 185
186 DEFINE_TYPE_CASTS(File, Blob, blob, blob->isFile(), blob.isFile()); 186 DEFINE_TYPE_CASTS(File, Blob, blob, blob->isFile(), blob.isFile());
187 187
188 } // namespace blink 188 } // namespace blink
189 189
190 #endif // File_h 190 #endif // File_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698