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

Side by Side Diff: extensions/renderer/resources/entry_id_manager.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 var fileSystemNatives = requireNative('file_system_natives'); 5 var fileSystemNatives = requireNative('file_system_natives');
6 6
7 var nameToIds = {}; 7 var nameToIds = {};
8 var idsToEntries = {}; 8 var idsToEntries = {};
9 9
10 function computeName(entry) { 10 function computeName(entry) {
(...skipping 29 matching lines...) Expand all
40 // If an entry has not been registered, compute its id and register it. 40 // If an entry has not been registered, compute its id and register it.
41 id = computeId(entry); 41 id = computeId(entry);
42 registerEntry(id, entry); 42 registerEntry(id, entry);
43 return id; 43 return id;
44 } 44 }
45 45
46 function getEntryById(id) { 46 function getEntryById(id) {
47 return idsToEntries[id]; 47 return idsToEntries[id];
48 } 48 }
49 49
50 exports.registerEntry = registerEntry; 50 exports.$set('registerEntry', registerEntry);
51 exports.getEntryId = getEntryId; 51 exports.$set('getEntryId', getEntryId);
52 exports.getEntryById = getEntryById; 52 exports.$set('getEntryById', getEntryById);
OLDNEW
« no previous file with comments | « extensions/renderer/resources/declarative_webrequest_custom_bindings.js ('k') | extensions/renderer/resources/event.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698