| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 { | 46 { |
| 47 if (error.isNull()) { | 47 if (error.isNull()) { |
| 48 *this = WebURLError(); | 48 *this = WebURLError(); |
| 49 } else { | 49 } else { |
| 50 domain = error.domain(); | 50 domain = error.domain(); |
| 51 reason = error.errorCode(); | 51 reason = error.errorCode(); |
| 52 unreachableURL = KURL(ParsedURLString, error.failingURL()); | 52 unreachableURL = KURL(ParsedURLString, error.failingURL()); |
| 53 isCancellation = error.isCancellation(); | 53 isCancellation = error.isCancellation(); |
| 54 staleCopyInCache = error.staleCopyInCache(); | 54 staleCopyInCache = error.staleCopyInCache(); |
| 55 localizedDescription = error.localizedDescription(); | 55 localizedDescription = error.localizedDescription(); |
| 56 wasIgnoredByHandler = error.wasIgnoredByHandler(); |
| 56 } | 57 } |
| 57 return *this; | 58 return *this; |
| 58 } | 59 } |
| 59 | 60 |
| 60 WebURLError::operator ResourceError() const | 61 WebURLError::operator ResourceError() const |
| 61 { | 62 { |
| 62 if (!reason) | 63 if (!reason) |
| 63 return ResourceError(); | 64 return ResourceError(); |
| 64 CString spec = unreachableURL.spec(); | 65 CString spec = unreachableURL.spec(); |
| 65 ResourceError resourceError = ResourceError(domain, reason, String::fromUTF8
(spec.data(), spec.length()), localizedDescription); | 66 ResourceError resourceError = ResourceError(domain, reason, String::fromUTF8
(spec.data(), spec.length()), localizedDescription); |
| 66 resourceError.setIsCancellation(isCancellation); | 67 resourceError.setIsCancellation(isCancellation); |
| 67 resourceError.setStaleCopyInCache(staleCopyInCache); | 68 resourceError.setStaleCopyInCache(staleCopyInCache); |
| 69 resourceError.setWasIgnoredByHandler(wasIgnoredByHandler); |
| 68 return resourceError; | 70 return resourceError; |
| 69 } | 71 } |
| 70 | 72 |
| 71 } // namespace blink | 73 } // namespace blink |
| OLD | NEW |