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

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

Issue 403013002: Rename WebCore to blink in Modules (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
« no previous file with comments | « Source/modules/crypto/SubtleCrypto.h ('k') | Source/modules/crypto/WorkerGlobalScopeCrypto.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 24 matching lines...) Expand all
35 #include "core/dom/ExecutionContext.h" 35 #include "core/dom/ExecutionContext.h"
36 #include "modules/crypto/CryptoKey.h" 36 #include "modules/crypto/CryptoKey.h"
37 #include "modules/crypto/CryptoResultImpl.h" 37 #include "modules/crypto/CryptoResultImpl.h"
38 #include "modules/crypto/NormalizeAlgorithm.h" 38 #include "modules/crypto/NormalizeAlgorithm.h"
39 #include "platform/JSONValues.h" 39 #include "platform/JSONValues.h"
40 #include "public/platform/Platform.h" 40 #include "public/platform/Platform.h"
41 #include "public/platform/WebCrypto.h" 41 #include "public/platform/WebCrypto.h"
42 #include "public/platform/WebCryptoAlgorithm.h" 42 #include "public/platform/WebCryptoAlgorithm.h"
43 #include "wtf/ArrayBufferView.h" 43 #include "wtf/ArrayBufferView.h"
44 44
45 namespace WebCore { 45 namespace blink {
46 46
47 // Seems like the generated bindings should take care of these however it 47 // Seems like the generated bindings should take care of these however it
48 // currently doesn't. See also http://crbug.com/264520 48 // currently doesn't. See also http://crbug.com/264520
49 static bool ensureNotNull(const ArrayPiece& x, const char* paramName, CryptoResu lt* result) 49 static bool ensureNotNull(const ArrayPiece& x, const char* paramName, CryptoResu lt* result)
50 { 50 {
51 if (x.isNull()) { 51 if (x.isNull()) {
52 String message = String("Invalid ") + paramName + String(" argument"); 52 String message = String("Invalid ") + paramName + String(" argument");
53 result->completeWithError(blink::WebCryptoErrorTypeType, blink::WebStrin g(message)); 53 result->completeWithError(blink::WebCryptoErrorTypeType, blink::WebStrin g(message));
54 return false; 54 return false;
55 } 55 }
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 if (!parseAlgorithm(rawUnwrappedKeyAlgorithm, blink::WebCryptoOperationImpor tKey, unwrappedKeyAlgorithm, result.get())) 390 if (!parseAlgorithm(rawUnwrappedKeyAlgorithm, blink::WebCryptoOperationImpor tKey, unwrappedKeyAlgorithm, result.get()))
391 return promise; 391 return promise;
392 392
393 if (!unwrappingKey->canBeUsedForAlgorithm(unwrapAlgorithm, blink::WebCryptoO perationUnwrapKey, result.get())) 393 if (!unwrappingKey->canBeUsedForAlgorithm(unwrapAlgorithm, blink::WebCryptoO perationUnwrapKey, result.get()))
394 return promise; 394 return promise;
395 395
396 blink::Platform::current()->crypto()->unwrapKey(format, wrappedKey.bytes(), wrappedKey.byteLength(), unwrappingKey->key(), unwrapAlgorithm, unwrappedKeyAlgo rithm, extractable, keyUsages, result->result()); 396 blink::Platform::current()->crypto()->unwrapKey(format, wrappedKey.bytes(), wrappedKey.byteLength(), unwrappingKey->key(), unwrapAlgorithm, unwrappedKeyAlgo rithm, extractable, keyUsages, result->result());
397 return promise; 397 return promise;
398 } 398 }
399 399
400 } // namespace WebCore 400 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/crypto/SubtleCrypto.h ('k') | Source/modules/crypto/WorkerGlobalScopeCrypto.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698