| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/events/ApplicationCacheErrorEvent.h" | 5 #include "core/events/ApplicationCacheErrorEvent.h" |
| 6 | 6 |
| 7 namespace blink { | 7 namespace blink { |
| 8 | 8 |
| 9 static const String& errorReasonToString(WebApplicationCacheHost::ErrorReason re
ason) | 9 static const String& errorReasonToString(WebApplicationCacheHost::ErrorReason re
ason) |
| 10 { | 10 { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 return errorQuota; | 32 return errorQuota; |
| 33 case WebApplicationCacheHost::PolicyError: | 33 case WebApplicationCacheHost::PolicyError: |
| 34 return errorPolicy; | 34 return errorPolicy; |
| 35 case WebApplicationCacheHost::UnknownError: | 35 case WebApplicationCacheHost::UnknownError: |
| 36 return errorUnknown; | 36 return errorUnknown; |
| 37 } | 37 } |
| 38 NOTREACHED(); | 38 NOTREACHED(); |
| 39 return emptyString(); | 39 return emptyString(); |
| 40 } | 40 } |
| 41 | 41 |
| 42 ApplicationCacheErrorEvent::ApplicationCacheErrorEvent() | |
| 43 { | |
| 44 } | |
| 45 | |
| 46 ApplicationCacheErrorEvent::ApplicationCacheErrorEvent(WebApplicationCacheHost::
ErrorReason reason, const String& url, int status, const String& message) | 42 ApplicationCacheErrorEvent::ApplicationCacheErrorEvent(WebApplicationCacheHost::
ErrorReason reason, const String& url, int status, const String& message) |
| 47 : Event(EventTypeNames::error, false, false) | 43 : Event(EventTypeNames::error, false, false) |
| 48 , m_reason(errorReasonToString(reason)) | 44 , m_reason(errorReasonToString(reason)) |
| 49 , m_url(url) | 45 , m_url(url) |
| 50 , m_status(status) | 46 , m_status(status) |
| 51 , m_message(message) | 47 , m_message(message) |
| 52 { | 48 { |
| 53 } | 49 } |
| 54 | 50 |
| 55 ApplicationCacheErrorEvent::ApplicationCacheErrorEvent(const AtomicString& event
Type, const ApplicationCacheErrorEventInit& initializer) | 51 ApplicationCacheErrorEvent::ApplicationCacheErrorEvent(const AtomicString& event
Type, const ApplicationCacheErrorEventInit& initializer) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 69 ApplicationCacheErrorEvent::~ApplicationCacheErrorEvent() | 65 ApplicationCacheErrorEvent::~ApplicationCacheErrorEvent() |
| 70 { | 66 { |
| 71 } | 67 } |
| 72 | 68 |
| 73 DEFINE_TRACE(ApplicationCacheErrorEvent) | 69 DEFINE_TRACE(ApplicationCacheErrorEvent) |
| 74 { | 70 { |
| 75 Event::trace(visitor); | 71 Event::trace(visitor); |
| 76 } | 72 } |
| 77 | 73 |
| 78 } // namespace blink | 74 } // namespace blink |
| OLD | NEW |