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 WebURLError& WebURLError::operator=(const ResourceError& error) | 47 WebURLError& WebURLError::operator=(const ResourceError& error) |
48 { | 48 { |
49 if (error.isNull()) { | 49 if (error.isNull()) { |
50 *this = WebURLError(); | 50 *this = WebURLError(); |
51 } else { | 51 } else { |
52 domain = error.domain(); | 52 domain = error.domain(); |
53 reason = error.errorCode(); | 53 reason = error.errorCode(); |
54 unreachableURL = KURL(ParsedURLString, error.failingURL()); | 54 unreachableURL = KURL(ParsedURLString, error.failingURL()); |
55 isCancellation = error.isCancellation(); | 55 isCancellation = error.isCancellation(); |
| 56 staleCopyInCache = error.staleCopyInCache(); |
56 localizedDescription = error.localizedDescription(); | 57 localizedDescription = error.localizedDescription(); |
57 } | 58 } |
58 return *this; | 59 return *this; |
59 } | 60 } |
60 | 61 |
61 WebURLError::operator ResourceError() const | 62 WebURLError::operator ResourceError() const |
62 { | 63 { |
63 if (!reason) | 64 if (!reason) |
64 return ResourceError(); | 65 return ResourceError(); |
65 CString spec = unreachableURL.spec(); | 66 CString spec = unreachableURL.spec(); |
66 ResourceError resourceError = ResourceError(domain, reason, String::fromUTF8
(spec.data(), spec.length()), localizedDescription); | 67 ResourceError resourceError = ResourceError(domain, reason, String::fromUTF8
(spec.data(), spec.length()), localizedDescription); |
67 resourceError.setIsCancellation(isCancellation); | 68 resourceError.setIsCancellation(isCancellation); |
| 69 resourceError.setStaleCopyInCache(staleCopyInCache); |
68 return resourceError; | 70 return resourceError; |
69 } | 71 } |
70 | 72 |
71 } // namespace blink | 73 } // namespace blink |
OLD | NEW |