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

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

Issue 61773005: Rename WebKit namespace to blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « Source/modules/crypto/Algorithm.h ('k') | Source/modules/crypto/CryptoResultImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 25 matching lines...) Expand all
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/NormalizeAlgorithm.h"
39 #include "modules/crypto/RsaKeyGenParams.h" 39 #include "modules/crypto/RsaKeyGenParams.h"
40 #include "modules/crypto/RsaSsaParams.h" 40 #include "modules/crypto/RsaSsaParams.h"
41 #include "platform/NotImplemented.h" 41 #include "platform/NotImplemented.h"
42 #include "wtf/text/WTFString.h" 42 #include "wtf/text/WTFString.h"
43 43
44 namespace WebCore { 44 namespace WebCore {
45 45
46 PassRefPtr<Algorithm> Algorithm::create(const WebKit::WebCryptoAlgorithm& algori thm) 46 PassRefPtr<Algorithm> Algorithm::create(const blink::WebCryptoAlgorithm& algorit hm)
47 { 47 {
48 switch (algorithm.paramsType()) { 48 switch (algorithm.paramsType()) {
49 case WebKit::WebCryptoAlgorithmParamsTypeNone: 49 case blink::WebCryptoAlgorithmParamsTypeNone:
50 return adoptRef(new Algorithm(algorithm)); 50 return adoptRef(new Algorithm(algorithm));
51 case WebKit::WebCryptoAlgorithmParamsTypeAesCbcParams: 51 case blink::WebCryptoAlgorithmParamsTypeAesCbcParams:
52 return AesCbcParams::create(algorithm); 52 return AesCbcParams::create(algorithm);
53 case WebKit::WebCryptoAlgorithmParamsTypeAesKeyGenParams: 53 case blink::WebCryptoAlgorithmParamsTypeAesKeyGenParams:
54 return AesKeyGenParams::create(algorithm); 54 return AesKeyGenParams::create(algorithm);
55 case WebKit::WebCryptoAlgorithmParamsTypeHmacParams: 55 case blink::WebCryptoAlgorithmParamsTypeHmacParams:
56 return HmacParams::create(algorithm); 56 return HmacParams::create(algorithm);
57 case WebKit::WebCryptoAlgorithmParamsTypeHmacKeyParams: 57 case blink::WebCryptoAlgorithmParamsTypeHmacKeyParams:
58 return HmacKeyParams::create(algorithm); 58 return HmacKeyParams::create(algorithm);
59 case WebKit::WebCryptoAlgorithmParamsTypeRsaSsaParams: 59 case blink::WebCryptoAlgorithmParamsTypeRsaSsaParams:
60 return RsaSsaParams::create(algorithm); 60 return RsaSsaParams::create(algorithm);
61 case WebKit::WebCryptoAlgorithmParamsTypeRsaKeyGenParams: 61 case blink::WebCryptoAlgorithmParamsTypeRsaKeyGenParams:
62 return RsaKeyGenParams::create(algorithm); 62 return RsaKeyGenParams::create(algorithm);
63 case WebKit::WebCryptoAlgorithmParamsTypeAesGcmParams: 63 case blink::WebCryptoAlgorithmParamsTypeAesGcmParams:
64 case WebKit::WebCryptoAlgorithmParamsTypeRsaOaepParams: 64 case blink::WebCryptoAlgorithmParamsTypeRsaOaepParams:
65 // TODO 65 // TODO
66 notImplemented(); 66 notImplemented();
67 break; 67 break;
68 } 68 }
69 ASSERT_NOT_REACHED(); 69 ASSERT_NOT_REACHED();
70 return 0; 70 return 0;
71 } 71 }
72 72
73 Algorithm::Algorithm(const WebKit::WebCryptoAlgorithm& algorithm) 73 Algorithm::Algorithm(const blink::WebCryptoAlgorithm& algorithm)
74 : m_algorithm(algorithm) 74 : m_algorithm(algorithm)
75 { 75 {
76 ScriptWrappable::init(this); 76 ScriptWrappable::init(this);
77 } 77 }
78 78
79 String Algorithm::name() 79 String Algorithm::name()
80 { 80 {
81 return algorithmIdToName(m_algorithm.id()); 81 return algorithmIdToName(m_algorithm.id());
82 } 82 }
83 83
84 } // namespace WebCore 84 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/crypto/Algorithm.h ('k') | Source/modules/crypto/CryptoResultImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698