OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 ResourceError ResourceError::copy() const | 44 ResourceError ResourceError::copy() const |
45 { | 45 { |
46 ResourceError errorCopy; | 46 ResourceError errorCopy; |
47 errorCopy.m_domain = m_domain.isolatedCopy(); | 47 errorCopy.m_domain = m_domain.isolatedCopy(); |
48 errorCopy.m_errorCode = m_errorCode; | 48 errorCopy.m_errorCode = m_errorCode; |
49 errorCopy.m_failingURL = m_failingURL.isolatedCopy(); | 49 errorCopy.m_failingURL = m_failingURL.isolatedCopy(); |
50 errorCopy.m_localizedDescription = m_localizedDescription.isolatedCopy(); | 50 errorCopy.m_localizedDescription = m_localizedDescription.isolatedCopy(); |
51 errorCopy.m_isNull = m_isNull; | 51 errorCopy.m_isNull = m_isNull; |
52 errorCopy.m_isCancellation = m_isCancellation; | 52 errorCopy.m_isCancellation = m_isCancellation; |
53 errorCopy.m_isTimeout = m_isTimeout; | 53 errorCopy.m_isTimeout = m_isTimeout; |
| 54 errorCopy.m_staleCopyInCache = m_staleCopyInCache; |
54 return errorCopy; | 55 return errorCopy; |
55 } | 56 } |
56 | 57 |
57 bool ResourceError::compare(const ResourceError& a, const ResourceError& b) | 58 bool ResourceError::compare(const ResourceError& a, const ResourceError& b) |
58 { | 59 { |
59 if (a.isNull() && b.isNull()) | 60 if (a.isNull() && b.isNull()) |
60 return true; | 61 return true; |
61 | 62 |
62 if (a.isNull() || b.isNull()) | 63 if (a.isNull() || b.isNull()) |
63 return false; | 64 return false; |
64 | 65 |
65 if (a.domain() != b.domain()) | 66 if (a.domain() != b.domain()) |
66 return false; | 67 return false; |
67 | 68 |
68 if (a.errorCode() != b.errorCode()) | 69 if (a.errorCode() != b.errorCode()) |
69 return false; | 70 return false; |
70 | 71 |
71 if (a.failingURL() != b.failingURL()) | 72 if (a.failingURL() != b.failingURL()) |
72 return false; | 73 return false; |
73 | 74 |
74 if (a.localizedDescription() != b.localizedDescription()) | 75 if (a.localizedDescription() != b.localizedDescription()) |
75 return false; | 76 return false; |
76 | 77 |
77 if (a.isCancellation() != b.isCancellation()) | 78 if (a.isCancellation() != b.isCancellation()) |
78 return false; | 79 return false; |
79 | 80 |
80 if (a.isTimeout() != b.isTimeout()) | 81 if (a.isTimeout() != b.isTimeout()) |
81 return false; | 82 return false; |
82 | 83 |
| 84 if (a.staleCopyInCache() != b.staleCopyInCache()) |
| 85 return false; |
| 86 |
83 return true; | 87 return true; |
84 } | 88 } |
85 | 89 |
86 } // namespace WebCore | 90 } // namespace WebCore |
OLD | NEW |