| 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 11 matching lines...) Expand all Loading... |
| 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #ifndef ResourceError_h | 27 #ifndef ResourceError_h |
| 28 #define ResourceError_h | 28 #define ResourceError_h |
| 29 | 29 |
| 30 #include "platform/PlatformExport.h" | 30 #include "platform/PlatformExport.h" |
| 31 #include "wtf/Allocator.h" | 31 #include "wtf/Allocator.h" |
| 32 #include "wtf/CrossThreadCopier.h" |
| 32 #include "wtf/text/WTFString.h" | 33 #include "wtf/text/WTFString.h" |
| 33 #include <iosfwd> | 34 #include <iosfwd> |
| 34 | 35 |
| 35 namespace blink { | 36 namespace blink { |
| 36 | 37 |
| 37 PLATFORM_EXPORT extern const char errorDomainBlinkInternal[]; // Used for errors
that won't be exposed to clients. | 38 PLATFORM_EXPORT extern const char errorDomainBlinkInternal[]; // Used for errors
that won't be exposed to clients. |
| 38 | 39 |
| 39 class PLATFORM_EXPORT ResourceError final { | 40 class PLATFORM_EXPORT ResourceError final { |
| 40 DISALLOW_NEW(); | 41 DISALLOW_NEW(); |
| 41 public: | 42 public: |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 }; | 108 }; |
| 108 | 109 |
| 109 inline bool operator==(const ResourceError& a, const ResourceError& b) { return
ResourceError::compare(a, b); } | 110 inline bool operator==(const ResourceError& a, const ResourceError& b) { return
ResourceError::compare(a, b); } |
| 110 inline bool operator!=(const ResourceError& a, const ResourceError& b) { return
!(a == b); } | 111 inline bool operator!=(const ResourceError& a, const ResourceError& b) { return
!(a == b); } |
| 111 | 112 |
| 112 // Pretty printer for gtest. Declared here to avoid ODR violations. | 113 // Pretty printer for gtest. Declared here to avoid ODR violations. |
| 113 std::ostream& operator<<(std::ostream&, const ResourceError&); | 114 std::ostream& operator<<(std::ostream&, const ResourceError&); |
| 114 | 115 |
| 115 } // namespace blink | 116 } // namespace blink |
| 116 | 117 |
| 118 namespace WTF { |
| 119 |
| 120 template <> |
| 121 struct CrossThreadCopier<blink::ResourceError> { |
| 122 STATIC_ONLY(CrossThreadCopier); |
| 123 typedef blink::ResourceError Type; |
| 124 PLATFORM_EXPORT static Type copy(const blink::ResourceError& error) |
| 125 { |
| 126 return error.copy(); |
| 127 } |
| 128 }; |
| 129 |
| 130 } // namespace WTF |
| 131 |
| 117 #endif // ResourceError_h | 132 #endif // ResourceError_h |
| OLD | NEW |