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

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

Issue 11348335: Revert 170514 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/extensions/dispatcher.cc ('k') | chrome/renderer/resources/renderer_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/extensions/permissions_custom_bindings.js
===================================================================
--- chrome/renderer/resources/extensions/permissions_custom_bindings.js (revision 170599)
+++ chrome/renderer/resources/extensions/permissions_custom_bindings.js (working copy)
@@ -1,36 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Custom bindings for the Permissions API.
-
-var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
-var sendRequest = require('sendRequest').sendRequest;
-var lastError = require('lastError');
-
-chromeHidden.registerCustomHook('permissions', function(api) {
- var apiFunctions = api.apiFunctions;
-
- apiFunctions.setUpdateArgumentsPreValidate('request',
- function() {
- if (arguments.length < 1)
- return arguments;
-
- var args = arguments[0].permissions;
- if (!args)
- return arguments;
-
- for (var i = 0; i < args.length; i += 1) {
- if (typeof(args[i]) == 'object') {
- var a = args[i];
- var keys = Object.keys(a);
- if (keys.length != 1) {
- throw new Error("Too many keys in object-style permission.");
- }
- arguments[0].permissions[i] = keys[0] + '|' + a[keys[0]];
- }
- }
-
- return arguments;
- });
-});
« no previous file with comments | « chrome/renderer/extensions/dispatcher.cc ('k') | chrome/renderer/resources/renderer_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698