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

Side by Side Diff: content/child/webcrypto/algorithm_dispatch.h

Issue 778543004: Add sanity check to generateKey to make sure usages aren't empty (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 #ifndef CONTENT_CHILD_WEBCRYPTO_ALGORITHM_DISPATCH_H_ 5 #ifndef CONTENT_CHILD_WEBCRYPTO_ALGORITHM_DISPATCH_H_
6 #define CONTENT_CHILD_WEBCRYPTO_ALGORITHM_DISPATCH_H_ 6 #define CONTENT_CHILD_WEBCRYPTO_ALGORITHM_DISPATCH_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "content/child/webcrypto/generate_key_result.h"
eroman 2014/12/05 19:41:55 Please move the header to the .cc file and leave t
nharper 2014/12/05 23:15:47 Done.
12 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
13 #include "third_party/WebKit/public/platform/WebCrypto.h" 14 #include "third_party/WebKit/public/platform/WebCrypto.h"
14 15
15 namespace content { 16 namespace content {
16 17
17 namespace webcrypto { 18 namespace webcrypto {
18 19
19 class AlgorithmImplementation; 20 class AlgorithmImplementation;
20 class CryptoData; 21 class CryptoData;
21 class GenerateKeyResult;
22 class Status; 22 class Status;
23 23
24 // These functions provide an entry point for synchronous webcrypto operations. 24 // These functions provide an entry point for synchronous webcrypto operations.
25 // 25 //
26 // The inputs to these methods come from Blink, and hence the validations done 26 // The inputs to these methods come from Blink, and hence the validations done
27 // by Blink can be assumed: 27 // by Blink can be assumed:
28 // 28 //
29 // * The algorithm parameters are consistent with the algorithm 29 // * The algorithm parameters are consistent with the algorithm
30 // * The key contains the required usage for the operation 30 // * The key contains the required usage for the operation
31 31
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 bool extractable, 104 bool extractable,
105 blink::WebCryptoKeyUsageMask usages, 105 blink::WebCryptoKeyUsageMask usages,
106 const CryptoData& key_data, 106 const CryptoData& key_data,
107 blink::WebCryptoKey* key); 107 blink::WebCryptoKey* key);
108 108
109 } // namespace webcrypto 109 } // namespace webcrypto
110 110
111 } // namespace content 111 } // namespace content
112 112
113 #endif // CONTENT_CHILD_WEBCRYPTO_ALGORITHM_DISPATCH_H_ 113 #endif // CONTENT_CHILD_WEBCRYPTO_ALGORITHM_DISPATCH_H_
OLDNEW
« no previous file with comments | « no previous file | content/child/webcrypto/algorithm_dispatch.cc » ('j') | content/child/webcrypto/algorithm_dispatch.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698