     # But it's useless here, so we just ignore it.
 
 if process.type is 'browser'
-  exports.parseCLIArg = parseCLIArg
+  exports.addSource = addSource
   exports.load = load
 
+exports.FLASH_PLAYER_FILENAME = FILENAME
 exports.getFlashVersion = getFlashVersion
 exports.getAllVersions = getAllVersions

{app} = require 'electron'
{join} = require 'path-extra'
fs = require 'fs-extra'
{error} = require './utils'

PLATFORM = process.platform
FILENAME = switch PLATFORM
  when 'darwin' then 'PepperFlashPlayer.plugin'
  when 'linux'  then 'libpepflashplayer.so'
  when 'win32'  then 'pepflashplayer.dll'
INNER_PATH = join 'PepperFlash', PLATFORM, FILENAME

validatePath = (path) ->
  return false if typeof path isnt 'string' or not path.endsWith FILENAME

    else ''

class FlashPlayerVersions
  constructor: (chromeFlashPath, systemFlashPath) ->
    @chrome = getFlashVersion chromeFlashPath if chromeFlashPath?
    @system = getFlashVersion systemFlashPath if systemFlashPath?

getAllVersions = ->
  new FlashPlayerVersions findChromeFlashPath(), findSystemFlashPath()

flashSources = []
addSource = (location) ->
  flashSources.push location

getPath = (loc) ->
  if loc?
    switch loc.toLowerCase()
      when '@chrome'
        flashPath = findChromeFlashPath()
        errMsg = 'Could not load Chrome Pepper Flash Player'
      when '@system'
        flashPath = findSystemFlashPath()
        errMsg = 'Could not load system Pepper Flash Player plug-in'
      else
        flashPath = loc if validatePath loc
        errMsg = "Invalid path to '#{FILENAME}': \n#{loc}"
  else
    for loc in flashSources
      flashPath = getPath loc
      break if flashPath?
  error errMsg if errMsg? and not flashPath?
  flashPath

load = ->
  flashPath = getPath()
  if flashPath?
    dbg.ex.flashLoader?.log "Loading Pepper Flash Player from:"
    dbg.ex.flashLoader?.log flashPath
