Use an opaque URL rather than an empty URL for request's site for cookies.

Apparently this makes a big difference to the cookie settings backend.

Bug: 881715
Change-Id: Id87fa0c6a858bae6a3f8fff4d6af3f974b00d5e4
Reviewed-on: https://chromium-review.googlesource.com/1212846
Commit-Queue: Mike West <mkwst@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589512}
bool NeedsHTTPOrigin(net::HttpRequestHeaders* headers,
                     const std::string& method) {
  if (headers->HasHeader(net::HttpRequestHeaders::kOrigin))
    return false;

  if (method == "GET" || method == "HEAD")
    return false;

  return true;
}

bool NeedsHTTPOrigin(net::HttpRequestHeaders* headers,
                     const std::string& method) {
  if (headers->HasHeader(net::HttpRequestHeaders::kOrigin))
    return false;

  if (method == "GET" || method == "HEAD")
    return false;

  return true;
}
