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) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 } | 105 } |
106 bool staleCopyInCache() const { return m_staleCopyInCache; } | 106 bool staleCopyInCache() const { return m_staleCopyInCache; } |
107 | 107 |
108 void setWasIgnoredByHandler(bool ignoredByHandler) { | 108 void setWasIgnoredByHandler(bool ignoredByHandler) { |
109 m_wasIgnoredByHandler = ignoredByHandler; | 109 m_wasIgnoredByHandler = ignoredByHandler; |
110 } | 110 } |
111 bool wasIgnoredByHandler() const { return m_wasIgnoredByHandler; } | 111 bool wasIgnoredByHandler() const { return m_wasIgnoredByHandler; } |
112 | 112 |
113 void setIsCacheMiss(bool isCacheMiss) { m_isCacheMiss = isCacheMiss; } | 113 void setIsCacheMiss(bool isCacheMiss) { m_isCacheMiss = isCacheMiss; } |
114 bool isCacheMiss() const { return m_isCacheMiss; } | 114 bool isCacheMiss() const { return m_isCacheMiss; } |
| 115 bool wasBlockedByResponse() const { |
| 116 return m_errorCode == net::ERR_BLOCKED_BY_RESPONSE; |
| 117 } |
115 | 118 |
116 static bool compare(const ResourceError&, const ResourceError&); | 119 static bool compare(const ResourceError&, const ResourceError&); |
117 | 120 |
118 private: | 121 private: |
119 String m_domain; | 122 String m_domain; |
120 int m_errorCode; | 123 int m_errorCode; |
121 String m_failingURL; | 124 String m_failingURL; |
122 String m_localizedDescription; | 125 String m_localizedDescription; |
123 bool m_isNull; | 126 bool m_isNull; |
124 bool m_isCancellation; | 127 bool m_isCancellation; |
(...skipping 10 matching lines...) Expand all Loading... |
135 inline bool operator!=(const ResourceError& a, const ResourceError& b) { | 138 inline bool operator!=(const ResourceError& a, const ResourceError& b) { |
136 return !(a == b); | 139 return !(a == b); |
137 } | 140 } |
138 | 141 |
139 // Pretty printer for gtest. Declared here to avoid ODR violations. | 142 // Pretty printer for gtest. Declared here to avoid ODR violations. |
140 std::ostream& operator<<(std::ostream&, const ResourceError&); | 143 std::ostream& operator<<(std::ostream&, const ResourceError&); |
141 | 144 |
142 } // namespace blink | 145 } // namespace blink |
143 | 146 |
144 #endif // ResourceError_h | 147 #endif // ResourceError_h |
OLD | NEW |