<!--
Thanks for opening an issue! A few things to keep in mind:

- The issue tracker is only for bugs and feature requests.
- Before reporting a bug, please try reproducing your issue against
  the latest version of Electron.
- If you need general advice, join our Slack: http://atom-slack.herokuapp.com
-->

* Electron version: 2.0.0-beta.6
* Operating system: confirmed on macOS locally, assume same on other OS

### Expected behavior
`disabled-by-default-memory-infra` should be collected.

<!-- What do you think should happen? -->

### Actual behavior
It is not. 

**It does seem some of other categories are also not working correctly, but hard to verify what's working vs. what's not working**

<!-- What actually happens? -->

### How to reproduce

Below's minimal code to automatically trigger content tracing, with single category filter `disabled-by-default-memory-infra` specified:

index.js
```
const { app, BrowserView, BrowserWindow, contentTracing } = require('electron')
const path = require('path')
const url = require('url')

let win
function createWindow() {
  win = new BrowserWindow({ width: 800, height: 600 })

  win.loadURL(url.format({
    pathname: path.join(`${__dirname}/src`, 'index.html'),
    protocol: 'file:',
    slashes: true
  }));

  //setup browserview to create dummy `load` to capture memory change
  let view = new BrowserView({
    webPreferences: {
      nodeIntegration: false
    }
  })

  win.setBrowserView(view)
  view.setBounds({ x: 0, y: 0, width: 300, height: 300 })
  view.webContents.loadURL('https://web.basemark.com/')

  win.on('closed', () => {
    win = null
  })

  const options = {
    traceOptions: 'record-until-full',
    categoryFilter: '-*,disabled-by-default-memory-infra' //exclude all category, set memory-infra only
  }

  contentTracing.startRecording(options, () => {
    console.log('Tracing started')

    setTimeout(() => {
      contentTracing.stopRecording('./a.trace', (path) => {
        console.log('Tracing data recorded to ' + path)
      })
    }, 10000)
  })
}

app.on('ready', createWindow)

app.on('window-all-closed', () => {
  if (process.platform !== 'darwin') {
    app.quit()
  }
})

app.on('activate', () => {
  if (win === null) {
    createWindow()
  }
})
```

index.html
```
<!DOCTYPE html>
  <html>
    <head>
      <meta charset="UTF-8">
      <title>Hello World!</title>
    </head>
    <body>
      <h1>Hello World!</h1>
      We are using node <script>document.write(process.versions.node)</script>,
      Chrome <script>document.write(process.versions.chrome)</script>,
      and Electron <script>document.write(process.versions.electron)</script>.
    </body>
  </html>
```

On 1.8.4, it collects memory infra stats correctly: 
![image](https://user-images.githubusercontent.com/1210596/38206798-a21bf7c4-3660-11e8-8d5a-1bfa086a1ff9.png)

On 2.0.0, the collected trace is simply empty: 
![image](https://user-images.githubusercontent.com/1210596/38206925-0db5c348-3661-11e8-8b9e-1d710f3bf33f.png)

this is full trace metadata on 2.0.0. As you could see below, it doesn't contain any actual trace but only initial metadata when trace kicked off 
```
{"traceEvents":[{"pid":93553,"tid":0,"ts":0,"ph":"M","cat":"__metadata","name":"num_cpus","args":{"number":8}},
{"pid":93553,"tid":13827,"ts":0,"ph":"M","cat":"__metadata","name":"process_sort_index","args":{"sort_index":-1}},
{"pid":93553,"tid":13827,"ts":0,"ph":"M","cat":"__metadata","name":"process_name","args":{"name":"GPU Process"}},
{"pid":93553,"tid":13827,"ts":0,"ph":"M","cat":"__metadata","name":"process_uptime_seconds","args":{"uptime":10}},{"pid":93565,"tid":0,"ts":0,"ph":"M","cat":"__metadata","name":"num_cpus","args":{"number":8}},
{"pid":93565,"tid":21511,"ts":0,"ph":"M","cat":"__metadata","name":"process_sort_index","args":{"sort_index":-5}},
{"pid":93565,"tid":21511,"ts":0,"ph":"M","cat":"__metadata","name":"process_name","args":{"name":"Renderer"}},
{"pid":93565,"tid":21511,"ts":0,"ph":"M","cat":"__metadata","name":"process_uptime_seconds","args":{"uptime":0}},
{"pid":93565,"tid":21511,"ts":0,"ph":"M","cat":"__metadata","name":"process_labels","args":{"labels":"Basemark Web 3.0 | Main page"}},
{"pid":93565,"tid":775,"ts":0,"ph":"M","cat":"__metadata","name":"thread_sort_index","args":{"sort_index":-1}},{"pid":93556,"tid":0,"ts":0,"ph":"M","cat":"__metadata","name":"num_cpus","args":{"number":8}},
{"pid":93556,"tid":21511,"ts":0,"ph":"M","cat":"__metadata","name":"process_sort_index","args":{"sort_index":-5}},
{"pid":93556,"tid":21511,"ts":0,"ph":"M","cat":"__metadata","name":"process_name","args":{"name":"Renderer"}},
{"pid":93556,"tid":21511,"ts":0,"ph":"M","cat":"__metadata","name":"process_uptime_seconds","args":{"uptime":10}},
{"pid":93556,"tid":775,"ts":0,"ph":"M","cat":"__metadata","name":"thread_sort_index","args":{"sort_index":-1}},{"pid":93554,"tid":0,"ts":0,"ph":"M","cat":"__metadata","name":"num_cpus","args":{"number":8}},
{"pid":93554,"tid":8455,"ts":0,"ph":"M","cat":"__metadata","name":"process_sort_index","args":{"sort_index":-5}},
{"pid":93554,"tid":8455,"ts":0,"ph":"M","cat":"__metadata","name":"process_name","args":{"name":"Renderer"}},
{"pid":93554,"tid":8455,"ts":0,"ph":"M","cat":"__metadata","name":"process_uptime_seconds","args":{"uptime":10}},
{"pid":93554,"tid":8455,"ts":0,"ph":"M","cat":"__metadata","name":"process_labels","args":{"labels":"Hello World!"}},
{"pid":93554,"tid":775,"ts":0,"ph":"M","cat":"__metadata","name":"thread_sort_index","args":{"sort_index":-1}},{"pid":93551,"tid":775,"ts":473973638595,"ph":"M","cat":"__metadata","name":"IsTimeTicksHighResolution","args":{"value":true},"tts":311029},
{"pid":93551,"tid":0,"ts":0,"ph":"M","cat":"__metadata","name":"num_cpus","args":{"number":8}},
{"pid":93551,"tid":26883,"ts":0,"ph":"M","cat":"__metadata","name":"process_sort_index","args":{"sort_index":-6}},
{"pid":93551,"tid":26883,"ts":0,"ph":"M","cat":"__metadata","name":"process_name","args":{"name":"Browser"}},
{"pid":93551,"tid":26883,"ts":0,"ph":"M","cat":"__metadata","name":"process_uptime_seconds","args":{"uptime":10}}],"metadata": {"clock-domain":"MAC_MACH_ABSOLUTE_TIME","command_line":"/Users/ojkwon/github/dummy-electron/node_modules/electron/dist/Electron.app/Contents/MacOS/Electron --no-sandbox --allow-file-access-from-files --enable-avfoundation ./src/index.js","cpu-brand":"Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz","cpu-family":6,"cpu-model":70,"cpu-stepping":1,"gpu-devid":26657,"gpu-driver":"","gpu-glver":"","gpu-psver":"","gpu-venid":4098,"gpu-vsver":"","highres-ticks":true,"network-type":"WiFi","num-cpus":8,"os-arch":"x86_64","os-name":"Mac OS X","os-version":"10.13.3","physical-memory":16384,"product-version":"Chrome/61.0.3163.100","trace-capture-datetime":"2018-4-2 17:23:53","trace-config":"{\"enable_argument_filter\":false,\"enable_systrace\":false,\"excluded_categories\":[\"*\"],\"included_categories\":[\"disabled-by-default-memory-infra\"],\"memory_dump_config\":{\"allowed_dump_modes\":[\"background\",\"light\",\"detailed\"],\"triggers\":[]},\"record_mode\":\"record-until-full\"}","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Electron/2.0.0-beta.6 Safari/537.36","v8-version":"6.1.534.41"}}
```

**Both (1.8.4/2.0.0) getCategories reports given trace category is supported one**

I couldn't verify each category, but it does seem few other categories are not working as well (mostly around `net-*` related, but based on limited testing)

<!-- 

Your best chance of getting this bug looked at quickly is to provide a REPOSITORY that can be cloned and run.

You can fork https://github.com/electron/electron-quick-start and include a link to the branch with your changes.

If you provide a URL, please list the commands required to clone/setup/run your repo e.g.

  $ git clone $YOUR_URL -b $BRANCH
  $ npm install
  $ npm start || electron .

-->

atom/browser/api/atom_api_content_tracing.cc
v8::Local<v8::Value> val,
                     base::trace_event::TraceConfig* out) {
    Dictionary options;
    if (!ConvertFromV8(isolate, val, &options))
      return false;
    std::string category_filter, trace_options;
    if (!options.Get("categoryFilter", &category_filter) ||
        !options.Get("traceOptions", &trace_options))
      return false;
    *out = base::trace_event::TraceConfig(category_filter, trace_options);
    return true;
  }
};
}  
namespace {
using CompletionCallback = base::Callback<void(const base::FilePath&)>;
scoped_refptr<TracingController::TraceDataEndpoint> GetTraceDataEndpoint(
    const base::FilePath& path,
    const CompletionCallback& callback) {
  base::FilePath result_file_path = path;
  if (result_file_path.empty() && !base::CreateTemporaryFile(&result_file_path))
    LOG(ERROR) << "Creating temporary file failed";
  return TracingController::CreateFileEndpoint(
      result_file_path, base::Bind(callback, result_file_path));
}
void StopRecording(const base::FilePath& path,