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

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

Issue 1417513003: [Extensions] Don't allow built-in extensions code to be overridden (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Jochen's Created 5 years, 1 month 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 // Routines used to normalize arguments to messaging functions. 5 // Routines used to normalize arguments to messaging functions.
6 6
7 function alignSendMessageArguments(args, hasOptionsArgument) { 7 function alignSendMessageArguments(args, hasOptionsArgument) {
8 // Align missing (optional) function arguments with the arguments that 8 // Align missing (optional) function arguments with the arguments that
9 // schema validation is expecting, e.g. 9 // schema validation is expecting, e.g.
10 // extension.sendRequest(req) -> extension.sendRequest(null, req) 10 // extension.sendRequest(req) -> extension.sendRequest(null, req)
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 if (lastArg >= 0) 43 if (lastArg >= 0)
44 targetId = args[lastArg--]; 44 targetId = args[lastArg--];
45 45
46 if (lastArg != -1) 46 if (lastArg != -1)
47 return null; 47 return null;
48 if (hasOptionsArgument) 48 if (hasOptionsArgument)
49 return [targetId, request, options, responseCallback]; 49 return [targetId, request, options, responseCallback];
50 return [targetId, request, responseCallback]; 50 return [targetId, request, responseCallback];
51 } 51 }
52 52
53 exports.alignSendMessageArguments = alignSendMessageArguments; 53 exports.$set('alignSendMessageArguments', alignSendMessageArguments);
OLDNEW
« no previous file with comments | « extensions/renderer/resources/messaging.js ('k') | extensions/renderer/resources/mime_handler_private_custom_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698