| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple 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 are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #define SocketStreamErrorBase_h | 33 #define SocketStreamErrorBase_h |
| 34 | 34 |
| 35 #include <wtf/text/WTFString.h> | 35 #include <wtf/text/WTFString.h> |
| 36 | 36 |
| 37 namespace WebCore { | 37 namespace WebCore { |
| 38 | 38 |
| 39 class SocketStreamError; | 39 class SocketStreamError; |
| 40 | 40 |
| 41 class SocketStreamErrorBase { | 41 class SocketStreamErrorBase { |
| 42 public: | 42 public: |
| 43 // Makes a deep copy. Useful for when you need to use a SocketStreamErr
or on another thread. | |
| 44 SocketStreamError copy() const; | |
| 45 | 43 |
| 46 bool isNull() const { return m_isNull; } | 44 bool isNull() const { return m_isNull; } |
| 47 | 45 |
| 48 int errorCode() const { return m_errorCode; } | 46 int errorCode() const { return m_errorCode; } |
| 49 const String& failingURL() const { return m_failingURL; } | 47 const String& failingURL() const { return m_failingURL; } |
| 50 const String& localizedDescription() const { return m_localizedDescripti
on; } | 48 const String& localizedDescription() const { return m_localizedDescripti
on; } |
| 51 | 49 |
| 52 static bool compare(const SocketStreamError&, const SocketStreamError&); | 50 static bool compare(const SocketStreamError&, const SocketStreamError&); |
| 53 | 51 |
| 54 protected: | 52 protected: |
| (...skipping 22 matching lines...) Expand all Loading... |
| 77 String m_localizedDescription; | 75 String m_localizedDescription; |
| 78 bool m_isNull; | 76 bool m_isNull; |
| 79 }; | 77 }; |
| 80 | 78 |
| 81 inline bool operator==(const SocketStreamError& a, const SocketStreamError&
b) { return SocketStreamErrorBase::compare(a, b); } | 79 inline bool operator==(const SocketStreamError& a, const SocketStreamError&
b) { return SocketStreamErrorBase::compare(a, b); } |
| 82 inline bool operator!=(const SocketStreamError& a, const SocketStreamError&
b) { return !(a == b); } | 80 inline bool operator!=(const SocketStreamError& a, const SocketStreamError&
b) { return !(a == b); } |
| 83 | 81 |
| 84 } // namespace WebCore | 82 } // namespace WebCore |
| 85 | 83 |
| 86 #endif // SocketStreamErrorBase_h | 84 #endif // SocketStreamErrorBase_h |
| OLD | NEW |