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

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

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global Created 3 years, 10 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
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 "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( 9 static const String& errorReasonToString(
10 WebApplicationCacheHost::ErrorReason reason) { 10 WebApplicationCacheHost::ErrorReason reason) {
(...skipping 18 matching lines...) Expand all
29 case WebApplicationCacheHost::AbortError: 29 case WebApplicationCacheHost::AbortError:
30 return errorAbort; 30 return errorAbort;
31 case WebApplicationCacheHost::QuotaError: 31 case WebApplicationCacheHost::QuotaError:
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( 42 ApplicationCacheErrorEvent::ApplicationCacheErrorEvent(
43 WebApplicationCacheHost::ErrorReason reason, 43 WebApplicationCacheHost::ErrorReason reason,
44 const String& url, 44 const String& url,
45 int status, 45 int status,
46 const String& message) 46 const String& message)
47 : Event(EventTypeNames::error, false, false), 47 : Event(EventTypeNames::error, false, false),
48 m_reason(errorReasonToString(reason)), 48 m_reason(errorReasonToString(reason)),
49 m_url(url), 49 m_url(url),
(...skipping 14 matching lines...) Expand all
64 m_message = initializer.message(); 64 m_message = initializer.message();
65 } 65 }
66 66
67 ApplicationCacheErrorEvent::~ApplicationCacheErrorEvent() {} 67 ApplicationCacheErrorEvent::~ApplicationCacheErrorEvent() {}
68 68
69 DEFINE_TRACE(ApplicationCacheErrorEvent) { 69 DEFINE_TRACE(ApplicationCacheErrorEvent) {
70 Event::trace(visitor); 70 Event::trace(visitor);
71 } 71 }
72 72
73 } // namespace blink 73 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698