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

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

Issue 1840453002: [Extensions] More bindings hardening (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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 // Custom binding for the logPrivate API. 5 // Custom binding for the logPrivate API.
6 var binding = require('binding').Binding.create('logPrivate'); 6 var binding = require('binding').Binding.create('logPrivate');
7 var sendRequest = require('sendRequest'); 7 var sendRequest = require('sendRequest');
8 8
9 var getFileBindingsForApi = 9 var getFileBindingsForApi =
10 require('fileEntryBindingUtil').getFileBindingsForApi; 10 require('fileEntryBindingUtil').getFileBindingsForApi;
11 var fileBindings = getFileBindingsForApi('logPrivate'); 11 var fileBindings = getFileBindingsForApi('logPrivate');
12 var bindFileEntryCallback = fileBindings.bindFileEntryCallback; 12 var bindFileEntryCallback = fileBindings.bindFileEntryCallback;
13 13
14 binding.registerCustomHook(function(bindingsAPI) { 14 binding.registerCustomHook(function(bindingsAPI) {
15 var apiFunctions = bindingsAPI.apiFunctions; 15 var apiFunctions = bindingsAPI.apiFunctions;
16 var fileSystem = bindingsAPI.compiledApi; 16 var fileSystem = bindingsAPI.compiledApi;
17 17
18 $Array.forEach(['dumpLogs'], 18 $Array.forEach(['dumpLogs'],
19 function(functionName) { 19 function(functionName) {
20 bindFileEntryCallback(functionName, apiFunctions); 20 bindFileEntryCallback(functionName, apiFunctions);
21 }); 21 });
22 22
23 }); 23 });
24 24
25 exports.bindFileEntryCallback = bindFileEntryCallback; 25 exports.$set('bindFileEntryCallback', bindFileEntryCallback);
26 exports.binding = binding.generate(); 26 exports.$set('binding', binding.generate());
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698