Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: chrome/common/origin_util.cc

Issue 1049533002: Add IsOriginSecure and GURL::SchemeUsesTLS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One does not simply check schemes and hosts for membership in tiny sets... Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/common/origin_util.h"
6
7 #include "content/public/common/origin_util.h"
8 #include "extensions/common/constants.h"
9 #include "url/gurl.h"
10
11 bool IsOriginSecure(const GURL& url) {
12 if (content::IsOriginSecure(url))
13 return true;
14
15 std::string scheme = url.scheme();
16 if (scheme == extensions::kExtensionScheme ||
17 scheme == extensions::kExtensionResourceScheme) {
18 return true;
19 }
20
21 return false;
22 }
OLDNEW
« no previous file with comments | « chrome/common/origin_util.h ('k') | content/common/url_schemes_unittest.cc » ('j') | url/gurl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698