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

Side by Side Diff: Source/core/events/ApplicationCacheErrorEvent.cpp

Issue 1115553002: Removing blink::prefix (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 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
« no previous file with comments | « Source/core/events/ApplicationCacheErrorEvent.h ('k') | Source/core/fetch/FontResource.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "config.h" 5 #include "config.h"
6 #include "core/events/ApplicationCacheErrorEvent.h" 6 #include "core/events/ApplicationCacheErrorEvent.h"
7 7
8 namespace blink { 8 namespace blink {
9 9
10 static const String& errorReasonToString(blink::WebApplicationCacheHost::ErrorRe ason reason) 10 static const String& errorReasonToString(WebApplicationCacheHost::ErrorReason re ason)
11 { 11 {
12 DEFINE_STATIC_LOCAL(String, errorManifest, ("manifest")); 12 DEFINE_STATIC_LOCAL(String, errorManifest, ("manifest"));
13 DEFINE_STATIC_LOCAL(String, errorSignature, ("signature")); 13 DEFINE_STATIC_LOCAL(String, errorSignature, ("signature"));
14 DEFINE_STATIC_LOCAL(String, errorResource, ("resource")); 14 DEFINE_STATIC_LOCAL(String, errorResource, ("resource"));
15 DEFINE_STATIC_LOCAL(String, errorChanged, ("changed")); 15 DEFINE_STATIC_LOCAL(String, errorChanged, ("changed"));
16 DEFINE_STATIC_LOCAL(String, errorAbort, ("abort")); 16 DEFINE_STATIC_LOCAL(String, errorAbort, ("abort"));
17 DEFINE_STATIC_LOCAL(String, errorQuota, ("quota")); 17 DEFINE_STATIC_LOCAL(String, errorQuota, ("quota"));
18 DEFINE_STATIC_LOCAL(String, errorPolicy, ("policy")); 18 DEFINE_STATIC_LOCAL(String, errorPolicy, ("policy"));
19 DEFINE_STATIC_LOCAL(String, errorUnknown, ("unknown")); 19 DEFINE_STATIC_LOCAL(String, errorUnknown, ("unknown"));
20 20
21 switch (reason) { 21 switch (reason) {
22 case blink::WebApplicationCacheHost::ManifestError: 22 case WebApplicationCacheHost::ManifestError:
23 return errorManifest; 23 return errorManifest;
24 case blink::WebApplicationCacheHost::SignatureError: 24 case WebApplicationCacheHost::SignatureError:
25 return errorSignature; 25 return errorSignature;
26 case blink::WebApplicationCacheHost::ResourceError: 26 case WebApplicationCacheHost::ResourceError:
27 return errorResource; 27 return errorResource;
28 case blink::WebApplicationCacheHost::ChangedError: 28 case WebApplicationCacheHost::ChangedError:
29 return errorChanged; 29 return errorChanged;
30 case blink::WebApplicationCacheHost::AbortError: 30 case WebApplicationCacheHost::AbortError:
31 return errorAbort; 31 return errorAbort;
32 case blink::WebApplicationCacheHost::QuotaError: 32 case WebApplicationCacheHost::QuotaError:
33 return errorQuota; 33 return errorQuota;
34 case blink::WebApplicationCacheHost::PolicyError: 34 case WebApplicationCacheHost::PolicyError:
35 return errorPolicy; 35 return errorPolicy;
36 case blink::WebApplicationCacheHost::UnknownError: 36 case WebApplicationCacheHost::UnknownError:
37 return errorUnknown; 37 return errorUnknown;
38 } 38 }
39 ASSERT_NOT_REACHED(); 39 ASSERT_NOT_REACHED();
40 return emptyString(); 40 return emptyString();
41 } 41 }
42 42
43 ApplicationCacheErrorEvent::ApplicationCacheErrorEvent() 43 ApplicationCacheErrorEvent::ApplicationCacheErrorEvent()
44 { 44 {
45 } 45 }
46 46
47 ApplicationCacheErrorEvent::ApplicationCacheErrorEvent(blink::WebApplicationCach eHost::ErrorReason reason, const String& url, int status, const String& message) 47 ApplicationCacheErrorEvent::ApplicationCacheErrorEvent(WebApplicationCacheHost:: ErrorReason reason, const String& url, int status, const String& message)
48 : Event(EventTypeNames::error, false, false) 48 : Event(EventTypeNames::error, false, false)
49 , m_reason(errorReasonToString(reason)) 49 , m_reason(errorReasonToString(reason))
50 , m_url(url) 50 , m_url(url)
51 , m_status(status) 51 , m_status(status)
52 , m_message(message) 52 , m_message(message)
53 { 53 {
54 } 54 }
55 55
56 ApplicationCacheErrorEvent::ApplicationCacheErrorEvent(const AtomicString& event Type, const ApplicationCacheErrorEventInit& initializer) 56 ApplicationCacheErrorEvent::ApplicationCacheErrorEvent(const AtomicString& event Type, const ApplicationCacheErrorEventInit& initializer)
57 : Event(eventType, initializer) 57 : Event(eventType, initializer)
(...skipping 12 matching lines...) Expand all
70 ApplicationCacheErrorEvent::~ApplicationCacheErrorEvent() 70 ApplicationCacheErrorEvent::~ApplicationCacheErrorEvent()
71 { 71 {
72 } 72 }
73 73
74 DEFINE_TRACE(ApplicationCacheErrorEvent) 74 DEFINE_TRACE(ApplicationCacheErrorEvent)
75 { 75 {
76 Event::trace(visitor); 76 Event::trace(visitor);
77 } 77 }
78 78
79 } // namespace blink 79 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/events/ApplicationCacheErrorEvent.h ('k') | Source/core/fetch/FontResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698