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

Side by Side Diff: extensions/renderer/resources/utils.js

Issue 332233002: enterprise.platformKeys: Copy-on-read the 'algorithm' member of Key objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed the unnecessary unit test. Created 6 years, 6 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 // 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 var createClassWrapper = requireNative('utils').createClassWrapper; 5 var createClassWrapper = requireNative('utils').createClassWrapper;
6 var nativeDeepCopy = requireNative('utils').deepCopy;
6 var schemaRegistry = requireNative('schema_registry'); 7 var schemaRegistry = requireNative('schema_registry');
7 var CHECK = requireNative('logging').CHECK; 8 var CHECK = requireNative('logging').CHECK;
8 var WARNING = requireNative('logging').WARNING; 9 var WARNING = requireNative('logging').WARNING;
9 10
10 /** 11 /**
11 * An object forEach. Calls |f| with each (key, value) pair of |obj|, using 12 * An object forEach. Calls |f| with each (key, value) pair of |obj|, using
12 * |self| as the target. 13 * |self| as the target.
13 * @param {Object} obj The object to iterate over. 14 * @param {Object} obj The object to iterate over.
14 * @param {function} f The function to call in each iteration. 15 * @param {function} f The function to call in each iteration.
15 * @param {Object} self The object to use as |this| in each function call. 16 * @param {Object} self The object to use as |this| in each function call.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 get: function() { 118 get: function() {
118 return privates(this).impl[readonly]; 119 return privates(this).impl[readonly];
119 }, 120 },
120 }); 121 });
121 }); 122 });
122 } 123 }
123 124
124 return publicClass; 125 return publicClass;
125 } 126 }
126 127
128 /**
129 * Returns a deep copy of |value|. The copy will have no references to nested
130 * values of |value|.
131 */
132 function deepCopy(value) {
133 return nativeDeepCopy(value);
134 }
135
127 exports.forEach = forEach; 136 exports.forEach = forEach;
128 exports.loadTypeSchema = loadTypeSchema; 137 exports.loadTypeSchema = loadTypeSchema;
129 exports.lookup = lookup; 138 exports.lookup = lookup;
130 exports.expose = expose; 139 exports.expose = expose;
140 exports.deepCopy = deepCopy;
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/enterprise_platform_keys/basic.js ('k') | extensions/renderer/utils_native_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698