- 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
const std::string& partition, bool in_memory,
    const base::DictionaryValue& options)
    : brightray::BrowserContext(partition, in_memory),
      network_delegate_(new AtomNetworkDelegate) {
  
  Browser* browser = Browser::Get();
  std::string name = RemoveWhitespace(browser->GetName());
  std::string user_agent;
  if (name == ATOM_PRODUCT_NAME) {
    user_agent = "Chrome/" CHROME_VERSION_STRING " "
                 ATOM_PRODUCT_NAME "/" ATOM_VERSION_STRING;
  } else {
    user_agent = base::StringPrintf(
        "%s/%s Chrome/%s " ATOM_PRODUCT_NAME "/" ATOM_VERSION_STRING,
        name.c_str(),
        browser->GetVersion().c_str(),
        CHROME_VERSION_STRING);
  }
  user_agent_ = content::BuildUserAgentFromProduct(user_agent);
  
  use_cache_ = true;
  options.GetBoolean("cache", &use_cache_);
  
  InitPrefs();
}
AtomBrowserContext::~AtomBrowserContext() {