Move IsOriginSecure() into //content and use it in ServiceWorker

IsOriginSecure() implements web platform feature [1] and it'd be
more natural to provide this at content-layer.
Also ServiceWorker actually wants to call this in content layer
for browser-side security check.

https://www.w3.org/TR/powerful-features/#is-origin-trustworthy.

This CL moves IsOriginSecure() from
chrome/common/origin_util.{h,cc} to
content/{public/,}/common/origin_util.{h,cc}

and adds a following method to ContentClient so that ChromeContentClient
can add chrome-level schemes (and whitelisted origins, this is to be
implemented in crbug.com/441605).

  // Gives the embedder a chance to register additional schemes and origins
  // that need to be considered trustworthy.
  // See https://www.w3.org/TR/powerful-features/#is-origin-trustworthy.
  virtual void AddSecureSchemesAndOrigins(std::set<std::string>* schemes,
                                          std::set<GURL>* origins) {}

BUG=362214, 441605
TEST=content_unittests:URLSchemesTest.IsOriginSecure

Review URL: https://codereview.chromium.org/1101033003

Cr-Commit-Position: refs/heads/master@{#326971}
16 files changed