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

Side by Side Diff: Source/modules/speech/SpeechRecognitionError.cpp

Issue 22572005: Remove all uses of the ASCIILiteral class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rm it from wtf Created 7 years, 4 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 15 matching lines...) Expand all
26 #include "config.h" 26 #include "config.h"
27 27
28 #include "modules/speech/SpeechRecognitionError.h" 28 #include "modules/speech/SpeechRecognitionError.h"
29 29
30 namespace WebCore { 30 namespace WebCore {
31 31
32 static String ErrorCodeToString(SpeechRecognitionError::ErrorCode code) 32 static String ErrorCodeToString(SpeechRecognitionError::ErrorCode code)
33 { 33 {
34 switch (code) { 34 switch (code) {
35 case SpeechRecognitionError::ErrorCodeOther: 35 case SpeechRecognitionError::ErrorCodeOther:
36 return ASCIILiteral("other"); 36 return "other";
37 case SpeechRecognitionError::ErrorCodeNoSpeech: 37 case SpeechRecognitionError::ErrorCodeNoSpeech:
38 return ASCIILiteral("no-speech"); 38 return "no-speech";
39 case SpeechRecognitionError::ErrorCodeAborted: 39 case SpeechRecognitionError::ErrorCodeAborted:
40 return ASCIILiteral("aborted"); 40 return "aborted";
41 case SpeechRecognitionError::ErrorCodeAudioCapture: 41 case SpeechRecognitionError::ErrorCodeAudioCapture:
42 return ASCIILiteral("audio-capture"); 42 return "audio-capture";
43 case SpeechRecognitionError::ErrorCodeNetwork: 43 case SpeechRecognitionError::ErrorCodeNetwork:
44 return ASCIILiteral("network"); 44 return "network";
45 case SpeechRecognitionError::ErrorCodeNotAllowed: 45 case SpeechRecognitionError::ErrorCodeNotAllowed:
46 return ASCIILiteral("not-allowed"); 46 return "not-allowed";
47 case SpeechRecognitionError::ErrorCodeServiceNotAllowed: 47 case SpeechRecognitionError::ErrorCodeServiceNotAllowed:
48 return ASCIILiteral("service-not-allowed"); 48 return "service-not-allowed";
49 case SpeechRecognitionError::ErrorCodeBadGrammar: 49 case SpeechRecognitionError::ErrorCodeBadGrammar:
50 return ASCIILiteral("bad-grammar"); 50 return "bad-grammar";
51 case SpeechRecognitionError::ErrorCodeLanguageNotSupported: 51 case SpeechRecognitionError::ErrorCodeLanguageNotSupported:
52 return ASCIILiteral("language-not-supported"); 52 return "language-not-supported";
53 } 53 }
54 54
55 ASSERT_NOT_REACHED(); 55 ASSERT_NOT_REACHED();
56 return String(); 56 return String();
57 } 57 }
58 58
59 PassRefPtr<SpeechRecognitionError> SpeechRecognitionError::create(ErrorCode code , const String& message) 59 PassRefPtr<SpeechRecognitionError> SpeechRecognitionError::create(ErrorCode code , const String& message)
60 { 60 {
61 return adoptRef(new SpeechRecognitionError(ErrorCodeToString(code), message) ); 61 return adoptRef(new SpeechRecognitionError(ErrorCodeToString(code), message) );
62 } 62 }
(...skipping 27 matching lines...) Expand all
90 const AtomicString& SpeechRecognitionError::interfaceName() const 90 const AtomicString& SpeechRecognitionError::interfaceName() const
91 { 91 {
92 return eventNames().interfaceForSpeechRecognitionError; 92 return eventNames().interfaceForSpeechRecognitionError;
93 } 93 }
94 94
95 SpeechRecognitionErrorInit::SpeechRecognitionErrorInit() 95 SpeechRecognitionErrorInit::SpeechRecognitionErrorInit()
96 { 96 {
97 } 97 }
98 98
99 } // namespace WebCore 99 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/notifications/Notification.cpp ('k') | Source/modules/speech/SpeechSynthesis.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698