How is the Chrome Extension ID of an unpacked extension generated?

后端 未结 3 1028
星月不相逢
星月不相逢 2020-11-29 11:36

I would like to share an unpacked extension with my colleagues. It uses the method chrome.runtime.sendMessage(string extensionId, any message, object options, function

3条回答
  •  既然无缘
    2020-11-29 12:21

    MaybeNormalizePath is affecting Windows usecase:

    base::FilePath MaybeNormalizePath(const base::FilePath& path) {
    #if defined(OS_WIN)
      // Normalize any drive letter to upper-case. We do this for consistency with
      // net_utils::FilePathToFileURL(), which does the same thing, to make string
      // comparisons simpler.
      base::FilePath::StringType path_str = path.value();
      if (path_str.size() >= 2 && path_str[0] >= L'a' && path_str[0] <= L'z' &&
          path_str[1] == L':')
        path_str[0] = towupper(path_str[0]);
      return base::FilePath(path_str);
    #else
      return path;
    #endif
    }
    
    
    
    https://chromium.googlesource.com/chromium/chromium/+/refs/heads/trunk/extensions/common/id_util.cc
    
    

提交回复
热议问题