Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: Source/platform/exported/WebURLError.cpp

Issue 1178273007: Add a flag for when a navigation is ignored (e.g. by shouldOverrideUrl). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/platform/network/ResourceError.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/platform/network/ResourceError.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698