- 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.h
class AtomNetworkDelegate;
class AtomPermissionManager;
class WebViewManager;
class AtomBrowserContext : public brightray::BrowserContext {
 public:
  
  
  
  static scoped_refptr<AtomBrowserContext> From(
      const std::string& partition, bool in_memory,
      const base::DictionaryValue& options = base::DictionaryValue());
  void SetUserAgent(const std::string& user_agent);
  
  net::NetworkDelegate* CreateNetworkDelegate() override;
  std::string GetUserAgent() override;
  std::unique_ptr<net::URLRequestJobFactory> CreateURLRequestJobFactory(
      content::ProtocolHandlerMap* protocol_handlers) override;
  net::HttpCache::BackendFactory* CreateHttpCacheBackendFactory(
      const base::FilePath& base_path) override;
  std::unique_ptr<net::CertVerifier> CreateCertVerifier() override;
  net::SSLConfigService* CreateSSLConfigService() override;
  
  content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
  content::BrowserPluginGuestManager* GetGuestManager() override;
  content::PermissionManager* GetPermissionManager() override;
  
  void RegisterPrefs(PrefRegistrySimple* pref_registry) override;
  AtomNetworkDelegate* network_delegate() const { return network_delegate_; }