Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 289 double modificationTime; | 289 double modificationTime; |
| 290 captureSnapshot(size, modificationTime); | 290 captureSnapshot(size, modificationTime); |
| 291 if (!m_fileSystemURL.isEmpty()) { | 291 if (!m_fileSystemURL.isEmpty()) { |
| 292 blobData.appendFileSystemURL(m_fileSystemURL, 0, size, modificationTime) ; | 292 blobData.appendFileSystemURL(m_fileSystemURL, 0, size, modificationTime) ; |
| 293 return; | 293 return; |
| 294 } | 294 } |
| 295 ASSERT(!m_path.isEmpty()); | 295 ASSERT(!m_path.isEmpty()); |
| 296 blobData.appendFile(m_path, 0, size, modificationTime); | 296 blobData.appendFile(m_path, 0, size, modificationTime); |
| 297 } | 297 } |
| 298 | 298 |
| 299 bool File::hasSameSource(const File& other) const | |
| 300 { | |
| 301 if (m_hasBackingFile != other.m_hasBackingFile) | |
| 302 return false; | |
| 303 | |
| 304 // Compare backing file. | |
|
tkent
2014/10/20 00:48:48
The comment adds nothing other than what the code
hirono
2014/10/20 03:50:06
Done.
| |
| 305 if (m_hasBackingFile) | |
| 306 return m_path == other.m_path; | |
| 307 | |
| 308 if (m_fileSystemURL.isEmpty() != other.m_fileSystemURL.isEmpty()) | |
| 309 return false; | |
| 310 | |
| 311 // Compare file system URL. | |
|
tkent
2014/10/20 00:48:48
Ditto.
hirono
2014/10/20 03:50:06
Done.
| |
| 312 if (!m_fileSystemURL.isEmpty()) | |
| 313 return m_fileSystemURL == other.m_fileSystemURL; | |
| 314 | |
| 315 // Compare blob UUID. | |
|
tkent
2014/10/20 00:48:48
Ditto.
hirono
2014/10/20 03:50:06
Done.
| |
| 316 return uuid() == other.uuid(); | |
| 317 } | |
| 318 | |
| 299 } // namespace blink | 319 } // namespace blink |
| OLD | NEW |