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

Unified Diff: net/base/mac/url_conversions.h

Issue 773373002: Update from https://crrev.com/306706 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/mac/README ('k') | net/base/mac/url_conversions.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/mac/url_conversions.h
diff --git a/net/base/mac/url_conversions.h b/net/base/mac/url_conversions.h
new file mode 100644
index 0000000000000000000000000000000000000000..56f53a9d4a2a2e16728adda7dd257869b63b7f28
--- /dev/null
+++ b/net/base/mac/url_conversions.h
@@ -0,0 +1,27 @@
+// Copyright 2012 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.
+
+#ifndef NET_BASE_MAC_URL_CONVERSIONS_H_
+#define NET_BASE_MAC_URL_CONVERSIONS_H_
+
+#include "net/base/net_export.h"
+
+class GURL;
+@class NSURL;
+
+namespace net {
+
+// Method for creating a valid NSURL (compliant with RFC 1738/1808/2396) from a
+// valid GURL. This method will return nil if the |url| is not valid.
+// Note that NSURLs should *always* be created from GURLs, so that GURL
+// sanitization rules are applied everywhere.
+NET_EXPORT NSURL* NSURLWithGURL(const GURL& url);
+
+// Method for creating a valid GURL from a NSURL. This method will return an
+// empty GURL if the |url| is nil.
+NET_EXPORT GURL GURLWithNSURL(NSURL* url);
+
+} // namespace net
+
+#endif // NET_BASE_MAC_URL_CONVERSIONS_H_
« no previous file with comments | « net/base/mac/README ('k') | net/base/mac/url_conversions.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698