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

Side by Side Diff: Source/modules/crypto/Algorithm.cpp

Issue 23503016: Cleanup: Remove the WebCryptoAlgorithm::name() attribute. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename get() --> instance() Created 7 years, 3 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) 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 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "modules/crypto/Algorithm.h" 32 #include "modules/crypto/Algorithm.h"
33 33
34 #include "modules/crypto/AesCbcParams.h" 34 #include "modules/crypto/AesCbcParams.h"
35 #include "modules/crypto/AesKeyGenParams.h" 35 #include "modules/crypto/AesKeyGenParams.h"
36 #include "modules/crypto/HmacKeyParams.h" 36 #include "modules/crypto/HmacKeyParams.h"
37 #include "modules/crypto/HmacParams.h" 37 #include "modules/crypto/HmacParams.h"
38 #include "modules/crypto/NormalizeAlgorithm.h"
38 #include "modules/crypto/RsaKeyGenParams.h" 39 #include "modules/crypto/RsaKeyGenParams.h"
39 #include "modules/crypto/RsaSsaParams.h" 40 #include "modules/crypto/RsaSsaParams.h"
40 #include "wtf/text/WTFString.h" 41 #include "wtf/text/WTFString.h"
41 42
42 namespace WebCore { 43 namespace WebCore {
43 44
44 PassRefPtr<Algorithm> Algorithm::create(const WebKit::WebCryptoAlgorithm& algori thm) 45 PassRefPtr<Algorithm> Algorithm::create(const WebKit::WebCryptoAlgorithm& algori thm)
45 { 46 {
46 switch (algorithm.paramsType()) { 47 switch (algorithm.paramsType()) {
47 case WebKit::WebCryptoAlgorithmParamsTypeNone: 48 case WebKit::WebCryptoAlgorithmParamsTypeNone:
(...skipping 16 matching lines...) Expand all
64 } 65 }
65 66
66 Algorithm::Algorithm(const WebKit::WebCryptoAlgorithm& algorithm) 67 Algorithm::Algorithm(const WebKit::WebCryptoAlgorithm& algorithm)
67 : m_algorithm(algorithm) 68 : m_algorithm(algorithm)
68 { 69 {
69 ScriptWrappable::init(this); 70 ScriptWrappable::init(this);
70 } 71 }
71 72
72 String Algorithm::name() 73 String Algorithm::name()
73 { 74 {
74 return m_algorithm.name(); 75 return algorithmIdToName(m_algorithm.id());
75 } 76 }
76 77
77 } // namespace WebCore 78 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp ('k') | Source/modules/crypto/NormalizeAlgorithm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698