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

Side by Side Diff: chrome/renderer/resources/extensions/schema_utils.js

Issue 15841013: Make miscellaneous_bindings and event_bindings Required as needed. Previously (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Routines used to validate and normalize arguments. 5 // Routines used to validate and normalize arguments.
6 6
7 require('json_schema'); // for chromeHidden.JSONSchemaValidator
7 var chromeHidden = requireNative('chrome_hidden').GetChromeHidden(); 8 var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
8 var chrome = requireNative('chrome').GetChrome(); 9 var chrome = requireNative('chrome').GetChrome();
9 10
10 // TODO(benwells): unit test this file. 11 // TODO(benwells): unit test this file.
11 // JSONSchemaValidator is not loaded in unit tests. 12 // JSONSchemaValidator is not loaded in unit tests.
12 var validate; 13 var validate;
13 if (chromeHidden.JSONSchemaValidator) { 14 if (chromeHidden.JSONSchemaValidator) {
14 var schemaValidator = new chromeHidden.JSONSchemaValidator(); 15 var schemaValidator = new chromeHidden.JSONSchemaValidator();
15 16
16 // Validate arguments. 17 // Validate arguments.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 return true; 155 return true;
155 } 156 }
156 } 157 }
157 return false; 158 return false;
158 }; 159 };
159 160
160 exports.isFunctionSignatureAmbiguous = isFunctionSignatureAmbiguous; 161 exports.isFunctionSignatureAmbiguous = isFunctionSignatureAmbiguous;
161 exports.normalizeArgumentsAndValidate = normalizeArgumentsAndValidate; 162 exports.normalizeArgumentsAndValidate = normalizeArgumentsAndValidate;
162 exports.schemaValidator = schemaValidator; 163 exports.schemaValidator = schemaValidator;
163 exports.validate = validate; 164 exports.validate = validate;
OLDNEW
« no previous file with comments | « chrome/renderer/resources/extensions/runtime_custom_bindings.js ('k') | chrome/renderer/resources/extensions/send_request.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698