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

Side by Side Diff: ios/web/public/origin_util.cc

Issue 1919473003: [ios Mojo] Added util function to convert WKSecurityOrigin to GURL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test Created 4 years, 7 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
« no previous file with comments | « ios/web/public/origin_util.h ('k') | ios/web/public/origin_util.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 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 "ios/web/public/origin_util.h"
6
7 #include "net/base/url_util.h"
8 #include "url/gurl.h"
9
10 namespace web {
11
12 bool IsOriginSecure(const GURL& url) {
13 if (url.SchemeIsCryptographic() || url.SchemeIsFile())
14 return true;
15
16 if (url.SchemeIsFileSystem() && url.inner_url() &&
17 IsOriginSecure(*url.inner_url())) {
18 return true;
19 }
20
21 std::string hostname = url.HostNoBrackets();
22 if (net::IsLocalhost(hostname))
23 return true;
24
25 return false;
26 }
27
28 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/public/origin_util.h ('k') | ios/web/public/origin_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698