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

Unified Diff: chrome/renderer/resources/extensions/enterprise_platform_keys/subtle_crypto.js

Issue 1903303002: Ensure that privates are private. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for failing tests Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/resources/extensions/enterprise_platform_keys/subtle_crypto.js
diff --git a/chrome/renderer/resources/extensions/enterprise_platform_keys/subtle_crypto.js b/chrome/renderer/resources/extensions/enterprise_platform_keys/subtle_crypto.js
index ece243057d53b71572d1ee2aaac21352edb083d6..c53bec335d50729143fb7d60fe6edfa5aafab132 100644
--- a/chrome/renderer/resources/extensions/enterprise_platform_keys/subtle_crypto.js
+++ b/chrome/renderer/resources/extensions/enterprise_platform_keys/subtle_crypto.js
@@ -6,7 +6,6 @@ var utils = require('utils');
var internalAPI = require('enterprise.platformKeys.internalAPI');
var intersect = require('platformKeys.utils').intersect;
var subtleCryptoModule = require('platformKeys.SubtleCrypto');
-var SubtleCrypto = subtleCryptoModule.SubtleCrypto;
var SubtleCryptoImpl = subtleCryptoModule.SubtleCryptoImpl;
var KeyPair = require('enterprise.platformKeys.KeyPair').KeyPair;
var KeyUsage = require('platformKeys.Key').KeyUsage;
@@ -133,11 +132,15 @@ EnterpriseSubtleCryptoImpl.prototype.generateKey =
});
};
-exports.SubtleCrypto =
- utils.expose('SubtleCrypto',
- EnterpriseSubtleCryptoImpl,
- {
- superclass: SubtleCrypto,
- functions: ['generateKey']
- // ['sign', 'exportKey'] are exposed by the base class
- });
+function SubtleCrypto() {
+ privates(SubtleCrypto).constructPrivate(this, arguments);
+}
+utils.expose(SubtleCrypto, EnterpriseSubtleCryptoImpl, {
+ superclass: subtleCryptoModule.SubtleCrypto,
+ functions: [
+ 'generateKey',
+ // 'sign', 'exportKey' are exposed by the base class
+ ],
+});
+
+exports.$set('SubtleCrypto', SubtleCrypto);

Powered by Google App Engine
This is Rietveld 408576698