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

Side by Side Diff: Source/core/platform/network/ResourceError.h

Issue 14495011: Revert "Create errors (especially cancellation errors) internally to WebCore, rather" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
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 17 matching lines...) Expand all
28 #define ResourceError_h 28 #define ResourceError_h
29 29
30 #include <wtf/text/WTFString.h> 30 #include <wtf/text/WTFString.h>
31 31
32 namespace WebCore { 32 namespace WebCore {
33 33
34 extern const char* const errorDomainWebKitInternal; // Used for errors that won' t be exposed to clients. 34 extern const char* const errorDomainWebKitInternal; // Used for errors that won' t be exposed to clients.
35 35
36 class ResourceError { 36 class ResourceError {
37 public: 37 public:
38 static ResourceError cancelledError(const String& failingURL);
39
40 ResourceError() 38 ResourceError()
41 : m_errorCode(0) 39 : m_errorCode(0)
42 , m_isNull(true) 40 , m_isNull(true)
43 , m_isCancellation(false) 41 , m_isCancellation(false)
44 , m_isTimeout(false) 42 , m_isTimeout(false)
45 { 43 {
46 } 44 }
47 45
48 ResourceError(const String& domain, int errorCode, const String& failingURL, const String& localizedDescription) 46 ResourceError(const String& domain, int errorCode, const String& failingURL, const String& localizedDescription)
49 : m_domain(domain) 47 : m_domain(domain)
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 bool m_isCancellation; 81 bool m_isCancellation;
84 bool m_isTimeout; 82 bool m_isTimeout;
85 }; 83 };
86 84
87 inline bool operator==(const ResourceError& a, const ResourceError& b) { return ResourceError::compare(a, b); } 85 inline bool operator==(const ResourceError& a, const ResourceError& b) { return ResourceError::compare(a, b); }
88 inline bool operator!=(const ResourceError& a, const ResourceError& b) { return !(a == b); } 86 inline bool operator!=(const ResourceError& a, const ResourceError& b) { return !(a == b); }
89 87
90 } // namespace WebCore 88 } // namespace WebCore
91 89
92 #endif // ResourceError_h 90 #endif // ResourceError_h
OLDNEW
« no previous file with comments | « Source/core/page/ContextMenuController.cpp ('k') | Source/core/platform/network/ResourceError.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698