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

Unified Diff: chrome/renderer/resources/extensions/runtime_custom_bindings.js

Issue 12517011: Added activity logging for ext APIs with custom bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modified setHandleRequest to avoid double logging Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/resources/extensions/runtime_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/runtime_custom_bindings.js b/chrome/renderer/resources/extensions/runtime_custom_bindings.js
index 61be155e68ce283630a526bc6ebcf875efbed65a..24fcb6491be3295641b497a65435b8008acc9eb1 100644
--- a/chrome/renderer/resources/extensions/runtime_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/runtime_custom_bindings.js
@@ -27,14 +27,14 @@ binding.registerCustomHook(function(binding, id, contextType) {
apiFunctions.setHandleRequest('getManifest', function() {
return runtimeNatives.GetManifest();
- });
+ }, false);
apiFunctions.setHandleRequest('getURL', function(path) {
path = String(path);
if (!path.length || path[0] != '/')
path = '/' + path;
return 'chrome-extension://' + id + path;
- });
+ }, false);
apiFunctions.setUpdateArgumentsPreValidate('sendMessage',
sendMessageUpdateArguments.bind(null, 'sendMessage'));
@@ -46,13 +46,13 @@ binding.registerCustomHook(function(binding, id, contextType) {
var port = runtime.connect(targetId || runtime.id,
{name: chromeHidden.kMessageChannel});
chromeHidden.Port.sendMessageImpl(port, message, responseCallback);
- });
+ }, false);
apiFunctions.setHandleRequest('sendNativeMessage',
function(targetId, message, responseCallback) {
var port = runtime.connectNative(targetId);
chromeHidden.Port.sendMessageImpl(port, message, responseCallback);
- });
+ }, false);
apiFunctions.setUpdateArgumentsPreValidate('connect', function() {
// Align missing (optional) function arguments with the arguments that
@@ -99,7 +99,7 @@ binding.registerCustomHook(function(binding, id, contextType) {
return chromeHidden.Port.createPort(portId, name);
}
throw new Error('Error connecting to extension ' + targetId);
- });
+ }, false);
//
// Privileged APIs.
@@ -115,7 +115,7 @@ binding.registerCustomHook(function(binding, id, contextType) {
return chromeHidden.Port.createPort(portId, '');
}
throw new Error('Error connecting to native app: ' + nativeAppName);
- });
+ }, false);
apiFunctions.setCustomCallback('getBackgroundPage',
function(name, request, response) {

Powered by Google App Engine
This is Rietveld 408576698