- Electron version: 1.2.2, and 1.3.1 (I only tested the 2 versions)
- Operating system: Windows 10

steps:

1.　Register a  custom protocol **`"app"`** by `protocol.registerFileProtocol`

```
    protocol.registerStandardSchemes(['app']);
    app.on('ready', function(){
        protocol.registerFileProtocol('app', (request, callback) => {
            //.......
        });
        //.......
    });
```

2.　call `cookies.set` for **`app://myhost/`**

```
    session.defaultSession.cookies.set({
            url : 'app://myhost/',      //custom protocol
            name : 'test',
            value : '12345'
        },
        (error)=>{
            if(error){
                console.log(error);  //error occurred here
            }
        }
    );
```

With url of custom protocol, an error will occur.  

If using standard http protocol, the code works well.

```
    session.defaultSession.cookies.set({
            url : 'http://otherhost/',     //standard http protocol
            name : 'test',
            value : '12345'
        },
        (error)=>{  //works well, no error
            if(error){
                console.log(error);
            }
        }
    );
```

atom/browser/atom_browser_context.cc
if (!permission_manager_.get())
    permission_manager_.reset(new AtomPermissionManager);
  return permission_manager_.get();
}
std::unique_ptr<net::CertVerifier> AtomBrowserContext::CreateCertVerifier() {
  return base::WrapUnique(new AtomCertVerifier);
}
net::SSLConfigService* AtomBrowserContext::CreateSSLConfigService() {
  return new AtomSSLConfigService;
}
void AtomBrowserContext::RegisterPrefs(PrefRegistrySimple* pref_registry) {
  pref_registry->RegisterFilePathPref(prefs::kSelectFileLastDirectory,
                                      base::FilePath());
  base::FilePath download_dir;
  PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &download_dir);
  pref_registry->RegisterFilePathPref(prefs::kDownloadDefaultDirectory,
                                      download_dir);
  pref_registry->RegisterDictionaryPref(prefs::kDevToolsFileSystemPaths);
}
scoped_refptr<AtomBrowserContext> AtomBrowserContext::From(
    const std::string& partition, bool in_memory,
    const base::DictionaryValue& options) {
  auto browser_context = brightray::BrowserContext::Get(partition, in_memory);
  if (browser_context)
    return static_cast<AtomBrowserContext*>(browser_context.get());
  return new AtomBrowserContext(partition, in_memory, options);
}
}