| Index: chrome/common/origin_util.cc
|
| diff --git a/chrome/common/origin_util.cc b/chrome/common/origin_util.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9b6939d7353c76b220d10dcb2d993498b2fccad0
|
| --- /dev/null
|
| +++ b/chrome/common/origin_util.cc
|
| @@ -0,0 +1,22 @@
|
| +// Copyright (c) 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/common/origin_util.h"
|
| +
|
| +#include "content/public/common/origin_util.h"
|
| +#include "extensions/common/constants.h"
|
| +#include "url/gurl.h"
|
| +
|
| +bool IsOriginSecure(const GURL& url) {
|
| + if (content::IsOriginSecure(url))
|
| + return true;
|
| +
|
| + std::string scheme = url.scheme();
|
| + if (scheme == extensions::kExtensionScheme ||
|
| + scheme == extensions::kExtensionResourceScheme) {
|
| + return true;
|
| + }
|
| +
|
| + return false;
|
| +}
|
|
|