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

Side by Side Diff: Source/modules/serviceworkers/ServiceWorkerError.cpp

Issue 964483004: Service Worker: Add a timeout error value. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | public/platform/WebServiceWorkerError.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // FIXME: Introduce new InstallError type to ExceptionCodes? 60 // FIXME: Introduce new InstallError type to ExceptionCodes?
61 return createException(AbortError, "The Service Worker installation fail ed.", webError->message); 61 return createException(AbortError, "The Service Worker installation fail ed.", webError->message);
62 case WebServiceWorkerError::ErrorTypeNetwork: 62 case WebServiceWorkerError::ErrorTypeNetwork:
63 return createException(NetworkError, "The Service Worker failed by netwo rk.", webError->message); 63 return createException(NetworkError, "The Service Worker failed by netwo rk.", webError->message);
64 case WebServiceWorkerError::ErrorTypeNotFound: 64 case WebServiceWorkerError::ErrorTypeNotFound:
65 return createException(NotFoundError, "The specified Service Worker reso urce was not found.", webError->message); 65 return createException(NotFoundError, "The specified Service Worker reso urce was not found.", webError->message);
66 case WebServiceWorkerError::ErrorTypeSecurity: 66 case WebServiceWorkerError::ErrorTypeSecurity:
67 return createException(SecurityError, "The Service Worker security polic y prevented an action.", webError->message); 67 return createException(SecurityError, "The Service Worker security polic y prevented an action.", webError->message);
68 case WebServiceWorkerError::ErrorTypeState: 68 case WebServiceWorkerError::ErrorTypeState:
69 return createException(InvalidStateError, "The Service Worker state was not valid.", webError->message); 69 return createException(InvalidStateError, "The Service Worker state was not valid.", webError->message);
70 case WebServiceWorkerError::ErrorTypeTimeout:
71 return createException(AbortError, "The Service Worker operation timed o ut.", webError->message);
70 case WebServiceWorkerError::ErrorTypeUnknown: 72 case WebServiceWorkerError::ErrorTypeUnknown:
71 return createException(UnknownError, "An unknown error occurred within S ervice Worker.", webError->message); 73 return createException(UnknownError, "An unknown error occurred within S ervice Worker.", webError->message);
72 } 74 }
73 ASSERT_NOT_REACHED(); 75 ASSERT_NOT_REACHED();
74 return DOMException::create(UnknownError); 76 return DOMException::create(UnknownError);
75 } 77 }
76 78
77 // static 79 // static
78 void ServiceWorkerError::dispose(WebType* webErrorRaw) 80 void ServiceWorkerError::dispose(WebType* webErrorRaw)
79 { 81 {
80 delete webErrorRaw; 82 delete webErrorRaw;
81 } 83 }
82 84
83 } // namespace blink 85 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | public/platform/WebServiceWorkerError.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698