getHostForPath => generateHostForPath

The original name implies no side effect, but is is not true.
This commit is contained in:
Cheng Zhao 2016-05-26 16:10:05 +09:00
parent c1272743b9
commit f29598d907

View file

@ -7,7 +7,7 @@ const url = require('url')
var hostPathMap = {} var hostPathMap = {}
var hostPathMapNextKey = 0 var hostPathMapNextKey = 0
var getHostForPath = function (path) { var generateHostForPath = function (path) {
var key var key
key = 'extension-' + (++hostPathMapNextKey) key = 'extension-' + (++hostPathMapNextKey)
hostPathMap[key] = path hostPathMap[key] = path
@ -30,7 +30,7 @@ var getExtensionInfoFromPath = function (srcDirectory) {
page = url.format({ page = url.format({
protocol: 'chrome-extension', protocol: 'chrome-extension',
slashes: true, slashes: true,
hostname: getHostForPath(srcDirectory), hostname: generateHostForPath(srcDirectory),
pathname: manifest.devtools_page pathname: manifest.devtools_page
}) })
extensionInfoMap[manifest.name] = { extensionInfoMap[manifest.name] = {