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

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

Issue 18769009: [Activity Log] fix logging of blocked API calls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 7 years, 5 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
« no previous file with comments | « chrome/renderer/extensions/runtime_custom_bindings.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 var Event = require('event_bindings').Event; 5 var Event = require('event_bindings').Event;
6 var forEach = require('utils').forEach; 6 var forEach = require('utils').forEach;
7 var GetAvailability = requireNative('v8_context').GetAvailability; 7 var GetAvailability = requireNative('v8_context').GetAvailability;
8 var logActivity = requireNative('activityLogger'); 8 var logActivity = requireNative('activityLogger');
9 var logging = requireNative('logging'); 9 var logging = requireNative('logging');
10 var process = requireNative('process'); 10 var process = requireNative('process');
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 } 419 }
420 }); 420 });
421 }; 421 };
422 422
423 addProperties(mod, schema); 423 addProperties(mod, schema);
424 424
425 var availability = GetAvailability(schema.namespace); 425 var availability = GetAvailability(schema.namespace);
426 if (!availability.is_available && $Object.keys(mod).length == 0) { 426 if (!availability.is_available && $Object.keys(mod).length == 0) {
427 console.error('chrome.' + schema.namespace + ' is not available: ' + 427 console.error('chrome.' + schema.namespace + ' is not available: ' +
428 availability.message); 428 availability.message);
429 logActivity.LogBlockedCall(extensionId,
430 schema.namespace,
431 availability.result);
429 return; 432 return;
430 } 433 }
431 434
432 this.runHooks_(mod); 435 this.runHooks_(mod);
433 return mod; 436 return mod;
434 } 437 }
435 }; 438 };
436 439
437 exports.Binding = Binding; 440 exports.Binding = Binding;
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/runtime_custom_bindings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698